0

I'm trying to arrange three input videos into a single output video using ffmpeg's xstack. I currently have the operations working with a vstack followed by an hstack, but would like to combine them into an xstack for performance.

I've tried copying the syntax from multiple locations such as:

https://trac.ffmpeg.org/wiki/Create%20a%20mosaic%20out%20of%20several%20input%20videos%20using%20xstack

Vertically or horizontally stack (mosaic) several videos using ffmpeg?

My command is as follows:

C:\ffmpeg\bin\ffmpeg.exe -i states_full.mp4 -i title.mp4 -i graphs.mp4" -filter_complex "[0:v] setpts=PTS-STARTPTS, scale=qvga [a0]; [1:v] setpts=PTS-STARTPTS, scale=qvga [a1]; [2:v] setpts=PTS-STARTPTS, scale=qvga [a2]; [a0][a1][a2]xstack=inputs=3:layout=0_0|w0_0|w0_h0[out] " -map "[out]" -c:v libx264 -t '30' -f matroska output.mp4

The command always errors out at the same spot, with the same error message:

'w0_0' is not recognized as an internal or external command, operable program or batch file.

Some odd behavior is that even when I change the layout section to:

layout=w0_0|0_0|w0_h0

The error message is still on the middle '0_0' meaning it may be an error in formatting.

This issue is very strange, as the vstack and hstack still work, only the xstack fails.

Josh
  • 257
  • 1
  • 13

1 Answers1

1

On Windows, | is a special character for the command interpreter, which is the default shell. Quote the layout arg: layout='0_0|w0_0|w0_h0'

Gyan
  • 85,394
  • 9
  • 169
  • 201
  • Thank you so much, there were a couple other things wrong with my command, but your answer had made debugging significantly easier. – Josh Aug 12 '20 at 20:30