[FFmpeg-trac] #1618(FFmpeg:new): Scaling and padding to odd/uneven size fails

FFmpeg trac at avcodec.org
Wed Aug 8 16:27:33 CEST 2012


#1618: Scaling and padding to odd/uneven size fails
-------------------------------------+-------------------------------------
             Reporter:  agowad       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  FFmpeg       |                  Version:
             Keywords:  pad padding  |  unspecified
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------
 ### WHAT
 I am try resize (scale + pad) and convert a video file to mp4 format and
 defined size.

 ### PROBLEM
 When padding to odd width I face problems. Strangely, when I use even
 numbers then it works.

 ### COMMAND LINES (for two files)
 A. File "Duracell10sec_Cutdow__ulydCDCD.wmv"
 A.1 Resizing to 425x300
 * COMMAND LINE:
 ffmpeg.exe -i "Duracell10sec_Cutdow__ulydCDCD.wmv"  -vf
 "scale=427:239,pad=427:300:0:30,setdar=427:300"  -y -b:v 400k -r 49.75 -ar
 44100  -acodec libmp3lame -vcodec libx264 -ac 2
 "Duracell10sec_Cutdow__ulydCDCD4_TMP.mp4"

 * OUTPUT:
 ffmpeg version N-43206-gf857465 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Aug  4 2012 16:10:39 with gcc 4.7.1 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-
 frei0r --ena
 ble-libass --enable-libcelt --enable-libopencore-amrnb --enable-
 libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame
 --enable-li
 bnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-
 aacenc --e
 nable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
 --enable-libxavs --enable-libxvid --enable-zlib
   libavutil      51. 66.100 / 51. 66.100
   libavcodec     54. 49.100 / 54. 49.100
   libavformat    54. 22.100 / 54. 22.100
   libavdevice    54.  2.100 / 54.  2.100
   libavfilter     3.  5.102 /  3.  5.102
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0. 15.100 /  0. 15.100
   libpostproc    52.  0.100 / 52.  0.100
 Guessed Channel Layout for  Input Stream #0.0 : mono
 Input #0, asf, from 'Duracell10sec_Cutdow__ulydCDCD.wmv':
   Metadata:
     WMFSDKVersion   : 10.00.00.3702
     WMFSDKNeeded    : 0.0.0.0000
     IsVBR           : 1
     VBR Peak        : 139
     Buffer Average  : 151
   Duration: 00:00:10.04, start: 0.000000, bitrate: 1864 kb/s
     Stream #0:0(dan): Audio: wmav2 (a[1][0][0] / 0x0161), 8000 Hz, mono,
 s16, 0 kb/s
     Stream #0:1(dan): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p,
 1280x720, 1843 kb/s, 49.75 tbr, 1k tbn, 1k tbc
 [Parsed_pad_1 @ 01f9a760] Input area 0:30:427:269 not within the padded
 area 0:0:426:300 or zero-sized
 [Parsed_scale_0 @ 01fe7260] Failed to configure input pad on Parsed_pad_1
 Error opening filters!

 B. File "fishermans_friendCD_720_xvid.avi"
 B.1 Resizing to 425x300
 * COMMAND LINE:
 ffmpeg.exe -i "fishermans_friendCD_720_xvid.avi"  -vf
 "scale=425:239,pad=425:300:0:30,setdar=425:300"  -y -b:v 400k -r 25 -ar
 44100  -ab 128 -acodec libmp3lame -vcodec libx264 -ac 2
 "fishermans_friendCD_720_xvid4_TMP.mp4"

 * OUTPUT:
 ffmpeg version N-43206-gf857465 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Aug  4 2012 16:10:39 with gcc 4.7.1 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-
 frei0r --ena
 ble-libass --enable-libcelt --enable-libopencore-amrnb --enable-
 libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame
 --enable-li
 bnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-
 aacenc --e
 nable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
 --enable-libxavs --enable-libxvid --enable-zlib
   libavutil      51. 66.100 / 51. 66.100
   libavcodec     54. 49.100 / 54. 49.100
   libavformat    54. 22.100 / 54. 22.100
   libavdevice    54.  2.100 / 54.  2.100
   libavfilter     3.  5.102 /  3.  5.102
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0. 15.100 /  0. 15.100
   libpostproc    52.  0.100 / 52.  0.100
 Input #0, avi, from 'fishermans_friendCD_720_xvid.avi':
   Metadata:
     encoder         : MEncoder Sherpya-SVN-r32492-4.2.5
   Duration: 00:00:09.96, start: 0.000000, bitrate: 1090 kb/s
     Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658),
 yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
     Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16,
 128 kb/s
 [Parsed_pad_1 @ 03fd59e0] Input area 0:30:425:269 not within the padded
 area 0:0:424:300 or zero-sized
 [Parsed_scale_0 @ 03fd5940] Failed to configure input pad on Parsed_pad_1
 Error opening filters!

 ### FILES
 A. "Duracell10sec_Cutdow__ulydCDCD.wmv"
 * OUTPUT:
 ffmpeg version N-43206-gf857465 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Aug  4 2012 16:10:39 with gcc 4.7.1 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-
 frei0r --ena
 ble-libass --enable-libcelt --enable-libopencore-amrnb --enable-
 libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame
 --enable-li
 bnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-
 aacenc --e
 nable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
 --enable-libxavs --enable-libxvid --enable-zlib
   libavutil      51. 66.100 / 51. 66.100
   libavcodec     54. 49.100 / 54. 49.100
   libavformat    54. 22.100 / 54. 22.100
   libavdevice    54.  2.100 / 54.  2.100
   libavfilter     3.  5.102 /  3.  5.102
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0. 15.100 /  0. 15.100
   libpostproc    52.  0.100 / 52.  0.100
 [asf @ 01fbc400] Format asf probed with size=2048 and score=100
 [asf @ 01fbc400] gpos mismatch our pos=24, end=26
 [asf @ 01fbc400] gpos mismatch our pos=24, end=3622
 [asf @ 01fbc400] gpos mismatch our pos=24, end=38
 [asf @ 01fbc400] Unsupported value type 1 in tag ASFLeakyBucketPairs.
 [asf @ 01fbc400] gpos mismatch our pos=24, end=252
 [asf @ 01fbc400] gpos mismatch our pos=24, end=38
 [asf @ 01fbc400] File position before avformat_find_stream_info() is 5300
 [asf @ 01fbc400] parser not found for codec wmav2, packets or times may be
 invalid.
 [wmv3 @ 01fbd720] Header: 4DC11A01
 [wmv3 @ 01fbd720] Profile 1:
 frmrtq_postproc=6, bitrtq_postproc=28
 LoopFilter=0, MultiRes=0, FastUVMC=0, Extended MV=0
 Rangered=0, VSTransform=1, Overlap=1, SyncMarker=0
 DQuant=1, Quantizer mode=0, Max B frames=0
 [asf @ 01fbc400] parser not found for codec wmav2, packets or times may be
 invalid.
 [asf @ 01fbc400] All info found
 rfps: 24.583333 0.019493
     Last message repeated 1 times
 rfps: 24.666667 0.010206
     Last message repeated 1 times
 rfps: 24.750000 0.003909
     Last message repeated 1 times
 rfps: 24.833333 0.000600
     Last message repeated 1 times
 rfps: 24.916667 0.000281
 rfps: 25.000000 0.002950
 rfps: 25.083333 0.008607
     Last message repeated 1 times
 rfps: 25.166667 0.017254
     Last message repeated 1 times
 rfps: 49.500000 0.015636
     Last message repeated 1 times
 rfps: 49.583333 0.007524
     Last message repeated 1 times
 rfps: 49.666667 0.002402
     Last message repeated 1 times
 rfps: 49.750000 0.000268
     Last message repeated 1 times
 rfps: 49.833333 0.001122
 rfps: 49.916667 0.004966
 rfps: 50.000000 0.011798
 [asf @ 01fbc400] File position after avformat_find_stream_info() is 251519
 Guessed Channel Layout for  Input Stream #0.0 : mono
 Input #0, asf, from 'Duracell10sec_Cutdow__ulydCDCD.wmv':
   Metadata:
     WMFSDKVersion   : 10.00.00.3702
     WMFSDKNeeded    : 0.0.0.0000
     IsVBR           : 1
     VBR Peak        : 139
     Buffer Average  : 151
   Duration: 00:00:10.04, start: 0.000000, bitrate: 1864 kb/s
     Stream #0:0(dan), 18, 1/1000: Audio: wmav2 (a[1][0][0] / 0x0161), 8000
 Hz, mono, s16, 0 kb/s
     Stream #0:1(dan), 41, 1/1000: Video: wmv3 (Main) (WMV3 / 0x33564D57),
 yuv420p, 1280x720, 1/1000, 1843 kb/s, 49.75 tbr, 1k tbn, 1k tbc
 At least one output file must be specified
 [AVIOContext @ 01fb14e0] Statistics: 262144 bytes read, 0 seeks

 B. "fishermans_friendCD_720_xvid.avi"
 * OUTPUT:
 ffmpeg version N-43206-gf857465 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Aug  4 2012 16:10:39 with gcc 4.7.1 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-
 frei0r --ena
 ble-libass --enable-libcelt --enable-libopencore-amrnb --enable-
 libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame
 --enable-li
 bnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-
 aacenc --e
 nable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
 --enable-libxavs --enable-libxvid --enable-zlib
   libavutil      51. 66.100 / 51. 66.100
   libavcodec     54. 49.100 / 54. 49.100
   libavformat    54. 22.100 / 54. 22.100
   libavdevice    54.  2.100 / 54.  2.100
   libavfilter     3.  5.102 /  3.  5.102
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0. 15.100 /  0. 15.100
   libpostproc    52.  0.100 / 52.  0.100
 [avi @ 0235c400] Format avi probed with size=2048 and score=100
 [avi @ 02351560] use odml:1
 st:1 removing common factor 36 from timebase
 [avi @ 0235c400] File position before avformat_find_stream_info() is 4108
 [avi @ 0235c400] All info found
 [avi @ 0235c400] File position after avformat_find_stream_info() is 22706
 Input #0, avi, from 'fishermans_friendCD_720_xvid.avi':
   Metadata:
     encoder         : MEncoder Sherpya-SVN-r32492-4.2.5
   Duration: 00:00:09.96, start: 0.000000, bitrate: 1090 kb/s
     Stream #0:0, 1, 1/25: Video: mpeg4 (Simple Profile) (XVID /
 0x44495658), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1/25, 25 tbr, 25 tbn,
 25 tbc
     Stream #0:1, 20, 32/1225: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz,
 stereo, s16, 128 kb/s
 At least one output file must be specified
 [AVIOContext @ 023514c0] Statistics: 184008 bytes read, 7 seeks

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1618>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list