[MEncoder-users] mencoder: mp2->mp4 autoaspect question

Toerless Eckert Toerless.Eckert at Informatik.Uni-Erlangen.de
Tue Sep 21 03:17:11 CEST 2010


On Mon, Sep 20, 2010 at 09:05:37PM +0000, Carl Eugen Hoyos wrote:
> Toerless Eckert <Toerless.Eckert <at> Informatik.Uni-Erlangen.de> writes:
> 
> >    -vc mpeg12 -ovc lavc -lavcopts vcodec=mpeg4:v4mv:autoaspect:... 
> > 
> > This works only to a degree: the mpeg4 file seems to get the aspect
> > ratio that the mpeg2 input file has at the beginning (16:9 or 4:3),
> > but when the aspect ratio changes within the input mpeg2 file, then
> > this does not correctly gets translated into the mpeg4 file.
> 
> > Is this supposed to work with mencoder ?
> 
> I can only tell you that it works fine with ffmpeg (just tested).

Hmm. Not for me unfortunately. Can you tell me what you did exactly 
to test this ?

I tried both mp4 and avi output file and both didn't work:

ffmpeg -i 001.mpg -vcodec mpeg4  -b 1500k 001.avi
ffmpeg -i 001.mpg -vcodec mpeg4  -b 1500k 001.mp4

Input file is normal PAL resolution MPEG2 from TV,
first with 4:3 aspect ratio, then after a minute or so widescreen 
AR 16:9. VLC 1.1.4 nicely switches AR on the mpg file, but
not on the avi/mp4 file - but stays at 4:3.

FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers
  built on Sep 20 2010 18:00:40 with gcc 4.3.4
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/u
sr/share/man --enable-static --enable-shared --cc=i686-pc-linux-gnu-gcc --disabl
e-debug --disable-network --enable-libmp3lame --enable-libvorbis --enable-libx26
4 --enable-libxvid --disable-indev=v4l --disable-indev=v4l2 --disable-indev=oss 
--disable-indev=jack --disable-outdev=oss --enable-x11grab --disable-vdpau --dis
able-vaapi --disable-altivec --cpu=i686 --enable-gpl --enable-version3 --enable-
postproc --enable-avfilter --enable-avfilter-lavf --disable-stripping --enable-hardcoded-tables --disable-doc
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[mpeg @ 0x807b420]max_analyze_duration reached
Input #0, mpeg, from '001.mpg':
  Duration: 00:02:23.88, start: 0.200000, bitrate: 2777 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[0x1c0]: Audio: mp2, 48000 Hz, 2 channels, s16, 192 kb/s
Output #0, mp4, to '001.mp4':
  Metadata:
    encoder         : Lavf52.64.2
    Stream #0.0: Video: mpeg4, yuv420p, 720x576 [PAR 16:15 DAR 4:3], q=2-31, 1500 kb/s, 25 tbn, 25 tbc
    Stream #0.1: Audio: aac, 48000 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 3593 fps= 75 q=3.7 Lsize=   27522kB time=143.84 bitrate=1567.5kbits/s    
video:26278kB audio:1161kB global headers:0kB muxing overhead 0.303276%


> > If not, how difficult would it to add this to mencoder ?
> 
> Please note that mencoder is not actively maintained and that you should use
> ffmpeg for most transcoding.

If ffmpeg is supported it should have a better man page. Took
me eternities to figure out there's something like '-flags +ildct+ilme'.
Wonder how many other flags are also not on the document ;-(

Cheers
   Toerless
> 
> Carl Eugen
> 


More information about the MEncoder-users mailing list