the desired output is combining 3 vids, and using scale or pad (do some processing on the input).

ffmpeg -i in.mp4 -i in2.mkv -i in3.mkv \
-filter_complex "[0:v][v0];[1:v]scale=-1:1440[v1];[2:v][v2],[v0][v1][v2]hstack=inputs=3"
 -map "[v]" -map 1:a output.mp4


[AVFilterGraph @ 0xec0a80] No such filter: '' Error initializing complex filters. Invalid argument

  • What are [0:v][v0]; and [2:v][v2], meant to do? – Gyan Nov 29 '20 at 5:28
  • there is the confusing part, the pattern on filtergraph, [in]opt_preprocess[out]? – Adi Prasetyo Dec 1 '20 at 20:37

[0:v][v0] and [2:v][v2] don't contain any filter declaration, and thus ffmpeg complains. Insert whichever filter is desired in between the input and output pads.

I suppose you meant to scale the heights of the 3 inputs to match. In which case,

ffmpeg -i in.mp4 -i in2.mkv -i in3.mkv \ -filter_complex "[0:v]scale=-1:1440[v0];[1:v]scale=-1:1440[v1];[2:v]scale=-1:1440[v2];[v0][v1][v2]hstack=inputs=3" -map "[v]" -map 1:a output.mp4

on input processing with -filter_complex, you use this pattern:


  • I suggest an edit, please take a look. – Adi Prasetyo Dec 4 '20 at 7:46

Your Answer

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

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