且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用FFMPEG实时流式传输到Web音频API

更新时间:2022-01-14 23:56:31

我让它正常工作!

我要做的就是调整频道数量.

All I had to do is adjust the number of channel.

我已将FFMPEG设置为输出单声道音频,它的工作原理很吸引人.这是我的新FFMOEG命令:

I've set FFMPEG to output mono audio and it worked like a charm. Here is my new FFMOEG command:

var ffmpeg = child_process.spawn("ffmpeg",[
    "-re","-i",
    "A.mp3",
    "-ac","1","-f",
    "f32le",
    "pipe:1"                     // Output to STDOUT
    ]);