0

This is my already working stream:

ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i rtsp://stream1video -i rtsp://stream2audio -c:v copy -map 1:v -map 2:a -preset veryfast -pix_fmt + -c:a aac -f flv rtmp://a.rtmp.youtube.com/....

Now I would like to add two more audio files in the background in a loop.

something like this: -i /1.aac -i /2.aac

So it should be something like:

ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i rtsp://stream1video -i rtsp://stream2audio -stream_loop 1 -i /1.aac -stream_loop 1 -i 2.aac -c:v copy -map 1:v -map 2:a -map 3:a -map 4:a -preset veryfast -pix_fmt + -c:a aac -f flv rtmp://a.rtmp.youtube.com/....

But unfortunately, it doesn't work.

Any tips?

1 Answer 1

0

Assuming you want to downmix all three audio streams into one add the amix filter:

ffmpeg -rtsp_transport tcp -i rtsp://stream1video -i rtsp://stream2audio -re -stream_loop -1 -i 1.aac -re -stream_loop -1 -i 2.aac -filter_complex "[1:a][2:a][3:a]amix=inputs=3[a]" -map 0:v -map "[a]" -c:a aac -f flv rtmp://a.rtmp.youtube.com/
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.