0

I have a video 3000x1000.

I want the left part of video 1001x1000 and the right part of video 999x1000 to create a video 2000x1000. Center of original frame just dropped.

Is this possible with ffmpeg in one pass? And how?

1 Answer 1

1
ffmpeg -i input.mkv -filter_complex '[0:v]split[l0][r0];[l0]crop=1001:1000:0:0[l1];[r0]crop=999:1000:2001:0[r1];[l1][r1]hstack[out]' -map '[out]' ouput.mkv
2
  • It would be better if you could explain a little bit what this command does. This will help future readers and in particular those who don't have much experience with ffmpeg. .
    – slhck
    Nov 25, 2021 at 21:29
  • 1
    As I understand, every filter takes a number of streams and produces a number of streams. E.g. split takes source video stream 0 [0:v] and clones it to streams [l0] and [r0]. Then crop takes [l0] crops it and produces [l1] ... finally hstack takes [l1] and [r1] and place them side-by-side then produce stream [out]. Then -map maps stream [out] to an output stream.
    – Chameleon
    Dec 19, 2021 at 11:23

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.