[FFmpeg-user] Merge two videos into one with side-by-side composition

John Crossman johncrossman at berkeley.edu
Sat Jun 15 00:48:49 CEST 2013


Thanks for the quick reply. Here is the output.
*
*
*ffmpeg -i camera.mpg -i screen.mpg -filter_complex
"[0:v:0]pad=iw*2:ih[bg]; [bg][1:v:0]overlay=w" output.mpg*

ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on May 28 2013 16:00:47 with Apple LLVM version 4.2
(clang-425.0.27) (based on LLVM 3.2svn)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter
--enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora
--enable-libschroedinger --enable-libopenjpeg --enable-libmodplug
--enable-libvpx --enable-libspeex --enable-libfreetype
--mandir=/opt/local/share/man --enable-shared --enable-pthreads
--cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl
--enable-postproc --enable-libx264 --enable-libxvid
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mpeg @ 0x7f896a831000] max_analyze_duration 5000000 reached at 5005000
microseconds
Input #0, mpeg, from 'camera.mpg':
  Duration: 00:00:08.61, start: 0.500000, bitrate: 513 kb/s
    Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p, 768x480 [SAR 1:1 DAR
8:5], 104857 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc
[mpeg @ 0x7f896a813600] max_analyze_duration 5000000 reached at 5000000
microseconds
Input #1, mpeg, from 'screen.mpg':
  Duration: 00:00:08.83, start: 0.500000, bitrate: 530 kb/s
    Stream #1:0[0x1e0]: Video: mpeg1video, yuv420p, 1024x768 [SAR 1:1 DAR
4:3], 104857 kb/s, 30 fps, 30 tbr, 90k tbn, 30 tbc
[Parsed_overlay_1 @ 0x7f896a413a60] Overlay area with coordinates x1:1024
y1:0 x2:2048 y2:768 is not completely contained within the output with size
1536x480
[mpeg @ 0x7f896a839c00] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'output.mpg':
  Metadata:
    encoder         : Lavf54.63.104
    Stream #0:0: Video: mpeg1video, yuv420p, 1536x480 [SAR 1:1 DAR 16:5],
q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
Stream mapping:
  Stream #0:0 (mpeg1video) -> pad
  Stream #1:0 (mpeg1video) -> overlay:overlay
  overlay -> Stream #0:0 (mpeg1video)
Press [q] to stop, [?] for help
frame=  260 fps=109 q=31.0 Lsize=     708kB time=00:00:08.64 bitrate=
671.1kbits/s
video:703kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.709978%




On Fri, Jun 14, 2013 at 3:44 PM, Lou <lou at lrcd.com> wrote:

> On Fri, 14 Jun 2013 15:16:50 -0700
> John Crossman <johncrossman at berkeley.edu> wrote:
>
> > The side-by-side composition worked... Thank you!
> >
> > But one problem: The video on the right is positioned too far (1) to the
> > right and (2) down. Thus, those edge portions of the video are chopped
> away.
> >
> > Here is command I'm using:
> >
> > *ffmpeg -i  videoLeft.mpg -i  videoRight.mpg -filter_complex
> > "[0:v:0]pad=iw*2:ih[bg]; [bg][1:v:0]overlay=w"  output.mpg
> > *
>
> Please include also include the complete ffmpeg console output.
>
> > Any tips?
> >
> > Thanks again,
> > John
>
> Note that top-posting is not recommended on this mailing list.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>



-- 
*John Crossman*
Educational Technology Services
UC Berkeley

Work: (510) 725-2969
Personal: (510) 681-5483


More information about the ffmpeg-user mailing list