[FFmpeg-user] Combining .webm side by side - frame size changes

Moritz Barsnick barsnick at gmx.net
Tue Nov 24 14:38:35 CET 2015

Hi Mike,

On Mon, Nov 23, 2015 at 22:56:08 -0600, Mike Grommet wrote:

> During the playback of the combined file, The right side video appears 
> to zoom in to the top left of itself two times. The originals appear 
> fine when played individually.

Interesting that the latter should happen. I would (personally, not
suggesting to) inspect each frame of both files with ffprobe.

> I assume it has something to do with these messages from the ffmpeg
> run:
> Input stream #0:0 frame changed from size:640x480 fmt:yuv420p to size:480x360 fmt:yuv420p
> Input stream #0:0 frame changed from size:480x360 fmt:yuv420p to size:320x240 fmt:yuv420p

That seems likely. :)

> I also attempted a different way to merge the files (See Alternative 
> Command), and it has the same issue.

Firstly, you may want to use the vstack filter for this very purpose,
it saves you a lot of filter syntax:
Of course, as it notes, "[all] streams must be of same pixel format and
of same width."

That said, and considering the weird size jumps in the input: Have you
considered just inserting a scale filter to force the original size?

Something like
$ ./ffmpeg -i a.webm -i b.webm -filter_complex "[0:v]scale=640:480[left]; [1:v]scale=640:480[right]; [left][right]vstack[out] -map [out] -map 0:a -map 1:a c.webm

> Additional note:  As an experiment,  If I first convert the original 
> .webm files to .mp4,  combine these files together with a .webm final 
> target, I don't experience this problem.  This might be an option, but 
> it seems to be an awfully hacky solution.

Even more interesting. Are you re-encoding or just remuxing ("-c


More information about the ffmpeg-user mailing list