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

Mike Grommet mgrommet at techfriends.com
Tue Nov 24 05:56:08 CET 2015


I'm trying to combine two .webm videos side by side.  Each were recorded 
using the kurento WebRTC media server at 640x480. Using the Original 
Command below, the videos do combine but with an unexpected result.

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.  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

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

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.

I'm including the these commands , The FFMpeg output (for the original), 
and the ffprobe details on each of the source files - I'm pretty new to 
ffmpeg, and would appreciate a friendly shove in the right direction.


Original Command:

./ffmpeg -report -i a.webm -vf "[in] pad=2*iw:ih [left]; movie=b.webm 
[right]; [left][right] overlay=main_w/2:0 [out]" c.webm

Alternative Command:

./ffmpeg -i a.webm -i b.webm -filter_complex 
"[0:v]scale=iw/2:ih/2,pad=2*iw:ih[left];[1:v]scale=iw/2:ih/2[right];[left][right]overlay=main_w/2:0[out]" 
-map [out] -map 0:a -map 1:a c.webm



FFProbe:  a.webm:
--------------------------
ffprobe version N-51228-g8eadabf-static 
http://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2015 the FFmpeg 
developers
   built with gcc 5.2.1 (Debian 5.2.1-23) 20151028
   configuration: --enable-gpl --enable-version3 --disable-shared 
--disable-debug --enable-runtime-cpudetect --enable-libmp3lame 
--enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex 
--enable-libvorbis --enable-libvpx --enable-libfreetype 
--enable-fontconfig --enable-libxvid --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc 
--enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg 
--enable-libopus --enable-libass --enable-gnutls --enable-libvidstab 
--enable-libsoxr --enable-frei0r --enable-libfribidi 
--disable-indev=sndio --disable-outdev=sndio --cc=gcc
   libavutil      55.  7.100 / 55.  7.100
   libavcodec     57. 15.100 / 57. 15.100
   libavformat    57. 16.100 / 57. 16.100
   libavdevice    57.  0.100 / 57.  0.100
   libavfilter     6. 15.100 /  6. 15.100
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.101 /  2.  0.101
   libpostproc    54.  0.100 / 54.  0.100
Input #0, matroska,webm, from 'a.webm':
   Metadata:
     encoder         : GStreamer matroskamux version 1.5.91
     creation_time   : 2015-11-23 19:54:12
   Duration: 00:00:21.81, start: 0.000000, bitrate: 398 kb/s
     Stream #0:0(eng): Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 
29.67 tbr, 1k tbn, 1k tbc (default)
     Metadata:
       title           : Video
     Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)
     Metadata:
       title           : Audio



FFProbe b.webm
------------------------
techfriends at techfriends:~/Downloads/ffmpeg-git-20151120-32bit-static$ 
./ffprobe b.webm
ffprobe version N-51228-g8eadabf-static 
http://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2015 the FFmpeg 
developers
   built with gcc 5.2.1 (Debian 5.2.1-23) 20151028
   configuration: --enable-gpl --enable-version3 --disable-shared 
--disable-debug --enable-runtime-cpudetect --enable-libmp3lame 
--enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex 
--enable-libvorbis --enable-libvpx --enable-libfreetype 
--enable-fontconfig --enable-libxvid --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc 
--enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg 
--enable-libopus --enable-libass --enable-gnutls --enable-libvidstab 
--enable-libsoxr --enable-frei0r --enable-libfribidi 
--disable-indev=sndio --disable-outdev=sndio --cc=gcc
   libavutil      55.  7.100 / 55.  7.100
   libavcodec     57. 15.100 / 57. 15.100
   libavformat    57. 16.100 / 57. 16.100
   libavdevice    57.  0.100 / 57.  0.100
   libavfilter     6. 15.100 /  6. 15.100
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.101 /  2.  0.101
   libpostproc    54.  0.100 / 54.  0.100
Input #0, matroska,webm, from 'b.webm':
   Metadata:
     encoder         : GStreamer matroskamux version 1.5.91
     creation_time   : 2015-11-23 19:54:12
   Duration: 00:00:21.59, start: 0.000000, bitrate: 408 kb/s
     Stream #0:0(eng): Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 15 
tbr, 1k tbn, 1k tbc (default)
     Metadata:
       title           : Video
     Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)
     Metadata:
       title           : Audio



FFMPEG Output:
------------------------

ffmpeg version N-51228-g8eadabf-static http://johnvansickle.com/ffmpeg/  
Copyright (c) 2000-2015 the FFmpeg developers
   built with gcc 5.2.1 (Debian 5.2.1-23) 20151028
   configuration: --enable-gpl --enable-version3 --disable-shared 
--disable-debug --enable-runtime-cpudetect --enable-libmp3lame 
--enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex 
--enable-libvorbis --enable-libvpx --enable-libfreetype 
--enable-fontconfig --enable-libxvid --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc 
--enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg 
--enable-libopus --enable-libass --enable-gnutls --enable-libvidstab 
--enable-libsoxr --enable-frei0r --enable-libfribidi 
--disable-indev=sndio --disable-outdev=sndio --cc=gcc
   libavutil      55.  7.100 / 55.  7.100
   libavcodec     57. 15.100 / 57. 15.100
   libavformat    57. 16.100 / 57. 16.100
   libavdevice    57.  0.100 / 57.  0.100
   libavfilter     6. 15.100 /  6. 15.100
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.101 /  2.  0.101
   libpostproc    54.  0.100 / 54.  0.100
Input #0, matroska,webm, from 'a.webm':
   Metadata:
     encoder         : GStreamer matroskamux version 1.5.91
     creation_time   : 2015-11-23 19:54:12
   Duration: 00:00:21.81, start: 0.000000, bitrate: 398 kb/s
     Stream #0:0(eng): Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 
29.67 tbr, 1k tbn, 1k tbc (default)
     Metadata:
       title           : Video
     Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)
     Metadata:
       title           : Audio
[libvpx-vp9 @ 0xb689d80] v1.4.0-1490-g0134764
[libopus @ 0xb6523a0] No bit rate set. Defaulting to 96000 bps.
Output #0, webm, to 'c.webm':
   Metadata:
     encoder         : Lavf57.16.100
     Stream #0:0(eng): Video: vp9 (libvpx-vp9), yuv420p, 1280x480 [SAR 
1:1 DAR 8:3], q=-1--1, 200 kb/s, 29.67 fps, 1k tbn, 29.67 tbc (default)
     Metadata:
       title           : Video
       encoder         : Lavc57.15.100 libvpx-vp9
     Stream #0:1(eng): Audio: opus (libopus), 48000 Hz, stereo, flt, 96 
kb/s (default)
     Metadata:
       title           : Audio
       encoder         : Lavc57.15.100 libopus
Stream mapping:
   Stream #0:0 -> #0:0 (vp8 (native) -> vp9 (libvpx-vp9))
   Stream #0:1 -> #0:1 (vorbis (native) -> opus (libopus))
Press [q] to stop, [?] for help
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
Past duration 0.619331 too large    342kB time=00:00:11.82 bitrate= 
237.1kbits/s
Past duration 0.631660 too large    349kB time=00:00:11.98 bitrate= 
238.7kbits/s
Past duration 0.604332 too large    359kB time=00:00:12.30 bitrate= 
239.0kbits/s
Past duration 0.648659 too large    373kB time=00:00:12.74 bitrate= 
239.9kbits/s
Past duration 0.639992 too large
Past duration 0.673332 too large    375kB time=00:00:12.84 bitrate= 
239.3kbits/s
Past duration 0.633659 too large    386kB time=00:00:13.14 bitrate= 
240.3kbits/s
Past duration 0.684319 too large    387kB time=00:00:13.18 bitrate= 
240.2kbits/s
Past duration 0.717659 too large
Past duration 0.703987 too large    397kB time=00:00:13.44 bitrate= 
241.7kbits/s
Past duration 0.648323 too large    398kB time=00:00:13.50 bitrate= 
241.2kbits/s
Past duration 0.719994 too large
Past duration 0.693993 too large    406kB time=00:00:13.62 bitrate= 
243.9kbits/s
Past duration 0.629662 too large    410kB time=00:00:13.84 bitrate= 
242.4kbits/s
Past duration 0.692665 too large
Past duration 0.683998 too large    417kB time=00:00:14.02 bitrate= 
243.7kbits/s
Past duration 0.704994 too large
Past duration 0.666664 too large
Past duration 0.720985 too large    422kB time=00:00:14.16 bitrate= 
243.8kbits/s
Past duration 0.623329 too large
Past duration 0.703651 too large
Past duration 0.724663 too large
Past duration 0.686333 too large    432kB time=00:00:14.30 bitrate= 
247.1kbits/s
Past duration 0.647987 too large
Past duration 0.728325 too large
Past duration 0.681328 too large
Past duration 0.672661 too large    435kB time=00:00:14.46 bitrate= 
246.2kbits/s
Past duration 0.684990 too large    435kB time=00:00:14.52 bitrate= 
245.4kbits/s
Past duration 0.667656 too large
Past duration 0.679985 too large    443kB time=00:00:14.66 bitrate= 
247.6kbits/s
Past duration 0.645332 too large    446kB time=00:00:14.80 bitrate= 
246.9kbits/s
Past duration 0.695992 too large    447kB time=00:00:14.84 bitrate= 
246.9kbits/s
Past duration 0.627998 too large
Past duration 0.708321 too large
Past duration 0.699654 too large    456kB time=00:00:14.94 bitrate= 
250.2kbits/s
Past duration 0.779991 too large
Past duration 0.711998 too large
Past duration 0.703331 too large    459kB time=00:00:15.06 bitrate= 
249.5kbits/s
Past duration 0.639000 too large    461kB time=00:00:15.18 bitrate= 
248.7kbits/s
Past duration 0.630333 too large
Past duration 0.621666 too large
Past duration 0.752663 too large    469kB time=00:00:15.34 bitrate= 
250.1kbits/s
Past duration 0.625328 too large
Past duration 0.735329 too large
Past duration 0.667320 too large
Past duration 0.688332 too large    471kB time=00:00:15.46 bitrate= 
249.4kbits/s
Past duration 0.649986 too large
Past duration 0.691994 too large    472kB time=00:00:15.52 bitrate= 
248.9kbits/s
Past duration 0.712990 too large
Past duration 0.733986 too large
Past duration 0.695656 too large    478kB time=00:00:15.66 bitrate= 
250.0kbits/s
Past duration 0.737663 too large
Past duration 0.669655 too large
Past duration 0.631325 too large
Past duration 0.770988 too large    481kB time=00:00:15.80 bitrate= 
249.4kbits/s
Past duration 0.694328 too large    481kB time=00:00:15.84 bitrate= 
248.9kbits/s
Past duration 0.774666 too large
Past duration 0.795662 too large    488kB time=00:00:15.96 bitrate= 
250.3kbits/s
Past duration 0.757332 too large
Past duration 0.629997 too large
Past duration 0.739998 too large
Past duration 0.731331 too large    491kB time=00:00:16.08 bitrate= 
249.9kbits/s
Past duration 0.722664 too large
Past duration 0.773323 too large
Past duration 0.764656 too large    492kB time=00:00:16.18 bitrate= 
249.1kbits/s
Past duration 0.785652 too large
Past duration 0.806664 too large
Past duration 0.857323 too large    500kB time=00:00:16.32 bitrate= 
250.9kbits/s
Past duration 0.818993 too large
Past duration 0.780663 too large
Past duration 0.703987 too large    503kB time=00:00:16.42 bitrate= 
250.7kbits/s
Past duration 0.873329 too large
Past duration 0.775658 too large
Past duration 0.855995 too large    504kB time=00:00:16.52 bitrate= 
249.9kbits/s
Past duration 0.906654 too large
Past duration 0.770653 too large
Past duration 0.821327 too large    512kB time=00:00:16.68 bitrate= 
251.3kbits/s
Past duration 0.693993 too large
Past duration 0.803993 too large
Past duration 0.765663 too large    514kB time=00:00:16.78 bitrate= 
251.0kbits/s
Past duration 0.727333 too large
Past duration 0.748329 too large
Past duration 0.620995 too large    516kB time=00:00:16.86 bitrate= 
250.5kbits/s
Past duration 0.879326 too large
Past duration 0.840996 too large
Past duration 0.713661 too large
Past duration 0.793999 too large    524kB time=00:00:17.02 bitrate= 
252.2kbits/s
Past duration 0.725990 too large
Past duration 0.835991 too large
Past duration 0.827324 too large
Past duration 0.818657 too large    527kB time=00:00:17.10 bitrate= 
252.3kbits/s
Past duration 0.750664 too large
Past duration 0.771660 too large    528kB time=00:00:17.24 bitrate= 
250.7kbits/s
Past duration 0.792656 too large
Past duration 0.783989 too large
Past duration 0.825996 too large    534kB time=00:00:17.34 bitrate= 
252.3kbits/s
Past duration 0.846992 too large
Past duration 0.600990 too large
Past duration 0.918663 too large    536kB time=00:00:17.44 bitrate= 
251.9kbits/s
Past duration 0.791328 too large
Past duration 0.862999 too large    538kB time=00:00:17.56 bitrate= 
251.0kbits/s
Past duration 0.794991 too large
Past duration 0.904991 too large
Past duration 0.866661 too large    545kB time=00:00:17.66 bitrate= 
252.6kbits/s
Past duration 0.917320 too large
Past duration 0.878990 too large
Past duration 0.810997 too large    547kB time=00:00:17.74 bitrate= 
252.4kbits/s
Past duration 0.802330 too large
Past duration 0.882652 too large
Past duration 0.873985 too large    549kB time=00:00:17.92 bitrate= 
250.9kbits/s
Past duration 0.924660 too large
Past duration 0.886330 too large
Past duration 0.877663 too large    555kB time=00:00:18.06 bitrate= 
251.6kbits/s
Past duration 0.809654 too large
Past duration 0.919655 too large
Past duration 0.703331 too large    557kB time=00:00:18.06 bitrate= 
252.6kbits/s
Past duration 0.931999 too large
Past duration 0.834328 too large
Past duration 0.884987 too large    559kB time=00:00:18.20 bitrate= 
251.6kbits/s
Past duration 0.905998 too large
Past duration 0.867653 too large
Past duration 0.888664 too large    565kB time=00:00:18.22 bitrate= 
253.8kbits/s
Past duration 0.811989 too large
Past duration 0.921989 too large    567kB time=00:00:18.34 bitrate= 
253.2kbits/s
Past duration 0.853996 too large
Past duration 0.963997 too large
Past duration 0.955330 too large    569kB time=00:00:18.46 bitrate= 
252.6kbits/s
Past duration 0.887321 too large
Past duration 0.611656 too large
Past duration 0.869987 too large
Past duration 0.831657 too large    576kB time=00:00:18.56 bitrate= 
254.0kbits/s
Past duration 0.941658 too large
Past duration 0.754997 too large    577kB time=00:00:18.64 bitrate= 
253.5kbits/s
Past duration 0.945320 too large
Past duration 0.995995 too large    579kB time=00:00:18.80 bitrate= 
252.3kbits/s
Past duration 0.927986 too large
Past duration 0.800652 too large
Past duration 0.851326 too large    581kB time=00:00:18.86 bitrate= 
252.2kbits/s
Past duration 0.783333 too large
Past duration 0.922997 too large    585kB time=00:00:18.94 bitrate= 
253.1kbits/s
Past duration 0.994652 too large
Past duration 0.837654 too large
Past duration 0.947655 too large    587kB time=00:00:19.06 bitrate= 
252.5kbits/s
Past duration 0.820320 too large
Past duration 0.870995 too large
Past duration 0.921654 too large    589kB time=00:00:19.18 bitrate= 
251.6kbits/s
Past duration 0.883324 too large
Past duration 0.904320 too large    590kB time=00:00:19.28 bitrate= 
250.6kbits/s
Past duration 0.865990 too large
Past duration 0.857323 too large
Past duration 0.818993 too large    596kB time=00:00:19.32 bitrate= 
252.6kbits/s
Past duration 0.899330 too large
Past duration 0.890663 too large
Past duration 0.941322 too large    598kB time=00:00:19.42 bitrate= 
252.1kbits/s
Past duration 0.962318 too large
Past duration 0.945000 too large    599kB time=00:00:19.54 bitrate= 
251.2kbits/s
Past duration 0.847328 too large
Past duration 0.601326 too large    605kB time=00:00:19.58 bitrate= 
252.9kbits/s
Past duration 0.978325 too large
Past duration 0.969658 too large
Past duration 0.753319 too large    606kB time=00:00:19.70 bitrate= 
252.1kbits/s
Past duration 0.973320 too large
Past duration 0.756996 too large
Past duration 0.896660 too large    609kB time=00:00:19.80 bitrate= 
251.9kbits/s
Past duration 0.887993 too large
Past duration 0.811333 too large    610kB time=00:00:19.90 bitrate= 
251.0kbits/s
Past duration 0.713661 too large
Past duration 0.882988 too large
Past duration 0.992989 too large    616kB time=00:00:20.00 bitrate= 
252.1kbits/s
Past duration 0.687660 too large
Past duration 0.945992 too large    617kB time=00:00:20.12 bitrate= 
251.1kbits/s
Past duration 0.770332 too large    624kB time=00:00:20.38 bitrate= 
250.7kbits/s
Past duration 0.969322 too large    626kB time=00:00:20.48 bitrate= 
250.2kbits/s
Past duration 0.824654 too large    627kB time=00:00:20.56 bitrate= 
249.8kbits/s
Past duration 0.917320 too large
Past duration 0.997658 too large    634kB time=00:00:20.70 bitrate= 
250.8kbits/s
Past duration 0.645332 too large
Past duration 0.975319 too large    637kB time=00:00:20.90 bitrate= 
249.4kbits/s
Past duration 0.818321 too large
Past duration 0.957985 too large
Past duration 0.923332 too large    645kB time=00:00:21.12 bitrate= 
250.2kbits/s
frame=  637 fps=5.1 q=0.0 Lsize=     694kB time=00:00:21.80 bitrate= 
260.6kbits/s
video:504kB audio:177kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: 1.809044%



More information about the ffmpeg-user mailing list