Christian Ebert <[email protected]> added the comment:

In:
http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2010-November/027990.html
Stefano tells me not to use -aspect in conjunction with libavfilter.

The following does not respect the filter chain given on the cli:

$  ffmpeg -an -i kuckuckszeit.vob -b 500k -vf
crop=702:424,yadif,setsar=1:1,scale=640:360 -y test.mp4
FFmpeg version git-N-27556-g6a495e9, Copyright (c) 2000-2011 the FFmpeg 
developers
  built on Feb  7 2011 07:35:23 with gcc 4.0.1 (Apple Inc. build 5493)
  configuration: --enable-gpl --enable-version3 --enable-nonfree
--disable-network --disable-ffserver --disable-ffplay --enable-shared
--enable-pthreads --enable-postproc --enable-libx264 --enable-libxvid
--enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis
--enable-libvpx --extra-cflags=-I/sw/include --extra-libs=-L/sw/lib
  libavutil    50. 37. 0 / 50. 37. 0
  libavcore     0. 16. 1 /  0. 16. 1
  libavcodec   52.109. 0 / 52.109. 0
  libavformat  52. 97. 0 / 52. 97. 0
  libavdevice  52.  2. 3 / 52.  2. 3
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 12. 0 /  0. 12. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mpeg @ 0x1802600] max_analyze_duration reached
Input #0, mpeg, from 'test.vob':
  Duration: 00:00:49.27, start: 0.360000, bitrate: 5521 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3],
7000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0.1[0xa0]: Audio: pcm_s16be, 48000 Hz, 2 channels, s16, 1536 kb/s
[buffer @ 0x1701720] w:720 h:576 pixfmt:yuv420p
[yadif @ 0x17019d0] mode:0 parity:-1
[setsar @ 0x1701ca0] a:1/1
[crop @ 0x1701a10] w:720 h:576 -> w:702 h:424
[scale @ 0x1701e20] w:702 h:424 fmt:yuv420p -> w:640 h:360 fmt:yuv420p
flags:0xa0000004
Output #0, mp4, to 'test.mp4':
  Metadata:
    encoder         : Lavf52.97.0
    Stream #0.0: Video: mpeg4, yuv420p, 640x360 [PAR 1:1 DAR 16:9], q=2-31, 500
kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
video:3136kB audio:0kB global headers:0kB muxing overhead 0.343188%

Perhaps cropping before deinterlacing is not good practice,
and ffmpeg tries to protect me from myself?
But AFAIR the above chain would work in mencoder -
except for setsar where mencoder "prescales to correct movie aspect".

ffmpeg from ffmpeg.org breaks with the above cli:

$ ffmpeg -an -i test.vob -b 500k -vf crop=702:424,yadif,setsar=1:1,scale=640:360
-y test.mp4
FFmpeg version git-b319052, Copyright (c) 2000-2011 the FFmpeg developers
  built on Feb  7 2011 08:56:10 with gcc 4.0.1 (Apple Inc. build 5493)
  configuration: --enable-gpl --enable-version3 --enable-nonfree
--disable-network --disable-ffserver --disable-ffplay --enable-shared
--enable-pthreads --enable-postproc --enable-libx264 --enable-libxvid
--enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis
--enable-libvpx --extra-cflags=-I/sw/include --extra-libs=-L/sw/lib
  libavutil    50. 37. 0 / 50. 37. 0
  libavcore     0. 16. 1 /  0. 16. 1
  libavcodec   52.109. 0 / 52.109. 0
  libavformat  52. 97. 0 / 52. 97. 0
  libavdevice  52.  2. 3 / 52.  2. 3
  libavfilter   1. 74. 0 /  1. 76. 0
  libswscale    0. 12. 0 /  0. 12. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mpeg @ 0x1802600] max_analyze_duration reached
Input #0, mpeg, from 'kuckuckszeit.vob':
  Duration: 00:00:49.27, start: 0.360000, bitrate: 5521 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3],
7000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0.1[0xa0]: Audio: pcm_s16be, 48000 Hz, 2 channels, s16, 1536 kb/s
[buffer @ 0x1701720] Expected 7 arguments, but only 5 found in 
'720:576:0:1:1000000'
Error opening filters!

By now ffmpeg from ffmpeg.org also fails like above with the cli which _used_ to
work:

$ $ ffmpeg -an -i test.vob -b 500k -aspect 4:3 -s spal -vf
crop=768:432,yadif,scale=640:360 -y test.mp4

(which I explained to myself as something similar as mencoder's prescaling)

See https://lists.mplayerhq.hu/pipermail/ffmpeg-user/2010-November/028022.html

-aspect in conjunction with -vf and non-square input pixels leads to
broken results:

ffmpeg -an -i test.vob -b 500k -vf yadif -s 640x480 -y test.mp4
FFmpeg version git-N-27556-g6a495e9, Copyright (c) 2000-2011 the FFmpeg 
developers
  built on Feb  7 2011 07:35:23 with gcc 4.0.1 (Apple Inc. build 5493)
  configuration: --enable-gpl --enable-version3 --enable-nonfree
--disable-network --disable-ffserver --disable-ffplay --enable-shared
--enable-pthreads --enable-postproc --enable-libx264 --enable-libxvid
--enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis
--enable-libvpx --extra-cflags=-I/sw/include --extra-libs=-L/sw/lib
  libavutil    50. 37. 0 / 50. 37. 0
  libavcore     0. 16. 1 /  0. 16. 1
  libavcodec   52.109. 0 / 52.109. 0
  libavformat  52. 97. 0 / 52. 97. 0
  libavdevice  52.  2. 3 / 52.  2. 3
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 12. 0 /  0. 12. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, mpeg, from 'yadif-ripple.vob':
  Duration: 00:00:05.30, start: 1.000000, bitrate: 8868 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3],
104857 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 64 kb/s
[buffer @ 0x1700fc0] w:720 h:576 pixfmt:yuv420p
[yadif @ 0x17013b0] mode:0 parity:-1
[scale @ 0x1701210] w:720 h:576 fmt:yuv420p -> w:640 h:480 fmt:yuv420p
flags:0xa0000004
Output #0, mp4, to 'test.mp4':
  Metadata:
    encoder         : Lavf52.97.0
    Stream #0.0: Video: mpeg4, yuv420p, 640x480 [PAR 16:15 DAR 64:45], q=2-31,
500 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
video:464kB audio:0kB global headers:0kB muxing overhead 0.381985%


I'll stop here, but if all that is not confusing, I don't know what is.

________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2377>
________________________________________________

Reply via email to