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

Mike Grommet mgrommet at techfriends.com
Tue Nov 24 15:39:36 CET 2015

Hi Moritz, thanks for the response.

I will certainly check out the vstack method and report back.  Due to 
our specific use case, it may not be an option for us (we need the 
combined video in a horizontal format).  I'll also attempt a scale 
filter as well.

When I converted from the original webm to mp4, I simply used
./ffmpeg -i a.webm a.mp4, so I believe the answer is:  I am re-encoding.

Oddly, I still do get the frame size change notices, but it doesn't seem 
to make any difference when I combine the mp4s to the final webm target.

On 11/24/2015 7:38 AM, Moritz Barsnick wrote:
> 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:
> https://ffmpeg.org/ffmpeg-filters.html#vstack
> 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
> copy")?
> Cheers,
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

More information about the ffmpeg-user mailing list