Tag: 媒体源

在Node.js中的两个subprocess之间的pipe道?

我试图用Node.js使用FFmpeg捕捉video,并通过使用MediaSource API播放的websockets将其发送到浏览器。 到目前为止,我在Firefox中工作,但不能在Chrome中正确解码。 显然,从阅读这个问题我需要使用sample_muxer程序来确保每个“集群”以关键帧开始。 以下是我正在使用的代码: var ffmpeg = child_process.spawn("ffmpeg",[ "-y", "-r", "30", "-f","dshow", "-i","video=FFsource:audio=Stereo Mix (Realtek High Definition Audio)", "-vcodec", "libvpx", "-acodec", "libvorbis", "-threads", "0", "-b:v", "3300k", "-keyint_min", "150", "-g", "150", "-f", "webm", "-" // Output to STDOUT ]); ffmpeg.stdout.on('data', function(data) { //socket.send(data); // Just sending the FFmpeg clusters works with Firefox's // implementation of […]