[FFmpeg-user] Pad filter seems to have no effect

David Favor david at davidfavor.com
Tue Aug 23 05:04:23 CEST 2011


Input footage is a Skype recording with two video
tracks which require to be positioned side by side
in the final video.

Looks like the pad + overlay filter is the best way
to do this.

David-Favor-iMac> ffmpeg -filters | egrep 'pad|overlay'
ffmpeg version 0.7.1, Copyright (c) 2000-2011 the FFmpeg developers
   built on Aug 15 2011 19:40:46 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
   configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter 
--enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libxvid 
--enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads 
--disable-indevs --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-yasm
   libavutil    50. 43. 0 / 50. 43. 0
   libavcodec   52.122. 0 / 52.122. 0
   libavformat  52.110. 0 / 52.110. 0
   libavdevice  52.  5. 0 / 52.  5. 0
   libavfilter   1. 80. 0 /  1. 80. 0
   libswscale    0. 14. 1 /  0. 14. 1
   libpostproc  51.  2. 0 / 51.  2. 0
overlay          Overlay a video source on top of the input.
pad              Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black).

Input footage is...

David-Favor-iMac> ffmpeg -i test.skype.mov
ffmpeg version 0.7.1, Copyright (c) 2000-2011 the FFmpeg developers
   built on Aug 15 2011 19:40:46 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
   configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter 
--enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libxvid 
--enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads 
--disable-indevs --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-yasm
   libavutil    50. 43. 0 / 50. 43. 0
   libavcodec   52.122. 0 / 52.122. 0
   libavformat  52.110. 0 / 52.110. 0
   libavdevice  52.  5. 0 / 52.  5. 0
   libavfilter   1. 80. 0 /  1. 80. 0
   libswscale    0. 14. 1 /  0. 14. 1
   libpostproc  51.  2. 0 / 51.  2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x122054400] multiple edit list entries, a/v desync might occur, patch welcome
     Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x122054400] max_analyze_duration 5000000 reached at 5015510

Seems stream 2 codec frame rate differs from container frame rate: 2000.00 (2000/1) -> 1000.00 (2000/2)

Seems stream 3 codec frame rate differs from container frame rate: 2000.00 (2000/1) -> 1000.00 (2000/2)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.skype.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 537199360
     compatible_brands: qt
     creation_time   : 2011-08-18 14:38:00
   Duration: 00:15:32.39, start: 0.000000, bitrate: 818 kb/s
     Stream #0.0(eng): Audio: aac, 44100 Hz, mono, s16, 64 kb/s
     Metadata:
       creation_time   : 2011-08-18 14:38:00
     Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16, 97 kb/s
     Metadata:
       creation_time   : 2011-08-18 14:38:00
     Stream #0.2(eng): Video: h264 (Main), yuv420p, 640x480, 343 kb/s, 14.53 fps, 1k tbr, 1k tbn, 2k tbc
     Metadata:
       creation_time   : 2011-08-18 14:38:00
     Stream #0.3(eng): Video: h264 (Main), yuv420p, 640x480, 297 kb/s, 15.02 fps, 1k tbr, 1k tbn, 2k tbc
     Metadata:
       creation_time   : 2011-08-18 14:38:00
At least one output file must be specified

I've tried pad with all sorts of variations of arguments and codecs,
with no effect.

The command which appears to be correct is:

    ffmpeg -y -i test.skype.mov -an -vf pad=640:480:640:0:white -map 0.2 -vcodec copy test.video.mov

My goal is to just create an output video right padding one
video track by 640 pixels.

Someone let me know where I've gone wrong.

Thanks.

-- 
Love feeling your best ever, all day, every day?
Click http://RadicalHealth.com for the easy way!


More information about the ffmpeg-user mailing list