I am trying to use ffmpeg to make two videos play next to each other simultaneously with both videos' audio combined. This is the command I'm currently running:

$ ffmpeg -i video0.mp4 -i video1.mp4 \
    -filter_complex "[0:v][1:v]vstack[video]; [0:a][1:a]amix=inputs=2[audio]" \
    -map "[video]" -map "[audio]" -ac 2 output.mp4

When I run this command though, I get the following error:

Stream specifier ':a' in filtergraph description [0:v][1:v]vstack[video]; [0:a][1:a]amix=inputs=2[audio] matches no streams.

It seems like :a does not refer to the audio stream. What is the proper way to specify the audio streams of my input videos as input streams for the amix filter?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.