0

I want to attach 2 videos using hstack filter and this is what I am doing, resizing 1 of the video files (to match same height) and then proceeding to merge. This is happening as 2 different steps,

  1. ffmpeg -y -i inputVideo1 -vf scale=-2:900 outputVideo1
  2. ffmpeg -y -i outputVideo1 -i inputVideo2 -c:v libx264 -filter_complex hstack outputVideo2.mp4

This is taking longer time. How do I make this happen in a single step? Something like,

ffmpeg -i inputVideo1 (something here) outputVideo1 (take this as input) -i inputVideo2 (hstack and stuff) outputVideo2.mp4```

1 Answer 1

1

Combined command:

ffmpeg -i inputVideo1 -i inputVideo2 -c:v libx264 -filter_complex "[0:v]scale=-2:900[left];[left][1:v]hstack" outputVideo.mp4
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.