I have a live video stream and a live audio stream. The audio stream has to get mixed into the video stream and the resulting stream is pushed to YouTube. I have this working ffmpeg -i videostream -i audiostream -map 0:1 -map 1:0 -shortest -c:a copy -c:v copy -f flv streamout-youtube;
However I am losing the original audio in the videostream
. I want to have the original audio playing at maybe 20% of the original volume.
I looked around a lot and found maybe I can modify the above command to use -filter_complex
to get ffmpeg -i videostream -i audiostream -filter_complex "volume=0.2" -map 0:1 -map 1:0 -shortest -c:a copy -c:v copy -f flv streamout-youtube;
However, when I add the -filter_complex
option, the stream goes dead meaning it doesn't get pushed to youtube anymore. I have verified the stream keys are correct. This seems to be a rather simple thing but I can't put my finger on what's wrong.
I am using rtmp module of nginx to receive, mix and push out streams.