H
H
horevivan2019-10-21 12:05:55
Video
horevivan, 2019-10-21 12:05:55

How to merge two videos horizontally?

Good afternoon, did anyone make a video merging horizontally?
Maybe he just has an idea how to do it?
Preferably with the help of ffmpeg
in other words: there are two videos 640x480 lasting 5 minutes each
after gluing it turns out a video 1280x480 also lasting 5 minutes
thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2019-10-21
@horevivan

ffmpeg, overlay filter , see its examples right for your case:

ffmpeg -i left.avi -i right.avi -filter_complex "
nullsrc=size=200x100 [background];
[0:v] setpts=PTS-STARTPTS, scale=100x100 [left];
[1:v] setpts=PTS-STARTPTS, scale=100x100 [right];
[background][left]       overlay=shortest=1       [background+left];
[background+left][right] overlay=shortest=1:x=100 [left+right]
"  output.mp4

Only here they are adjusted to the size of 100x100 each, and you have other sizes - adjust.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question