推送到了html5 瀏覽器又怎樣呢,我們的客戶端,假設也必須要,傳輸自己的畫面自server 怎麼辦呢? 找了一下子發現又有 solution 可以用了
https://github.com/chenxiaoqino/getusermedia-to-rtmp
https://github.com/chenxiaoqino/getusermedia-to-rtmp
Install ffmpeg
Node.js install
Node.js install
Clone github download getusermedia-to-rtmp
Clone github download getusermedia-to-rtmp
ffmpeg param setting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg 參數設定
var ops=[
'-i','-',
'-c:v', 'libx264', '-preset', 'veryfast', '-tune', 'zerolatency',
'-an', //TODO: give up audio for now...
//'-async', '1',
'-filter_complex', 'aresample=44100', //necessary for trunked streaming?
//'-strict', 'experimental', '-c:a', 'aac', '-b:a', '128k',
'-bufsize', '1000',
'-f', 'flv', socket._rtmpDestination
];
run nodejs server!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg 參數設定 | |
var ops=[ | |
'-i','-', | |
'-c:v', 'libx264', '-preset', 'veryfast', '-tune', 'zerolatency', | |
'-an', //TODO: give up audio for now... | |
//'-async', '1', | |
'-filter_complex', 'aresample=44100', //necessary for trunked streaming? | |
//'-strict', 'experimental', '-c:a', 'aac', '-b:a', '128k', | |
'-bufsize', '1000', | |
'-f', 'flv', socket._rtmpDestination | |
]; | |
Html5 Rtmp server location
Html5 Rtmp server location