Live streaming using FFMPEG to web audio api

前端 未结 2 1435
萌比男神i
萌比男神i 2021-01-13 00:13

I am trying to stream audio using node.js + ffmpeg to browsers connected in LAN only using web audio api.

Not using element because it\'s adding it\'s own buffer of

2条回答
  •  臣服心动
    2021-01-13 00:19

    I got it working !!

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

    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
        ]);
    

提交回复
热议问题