[MEncoder-users] mencoder size and aspect ratios for H.264 video

John Ratliff webmaster at technoplaza.net
Sat Oct 3 23:45:00 CEST 2009


I'm using mencoder to convert a DVD to a matroska file with H.264 video
and Vorbis audio. But when I play the file, the aspect ratio is 2.43:1,
when it should be 16:9.

mkvmerge tells me it extracted the aspect ratio from the AVC video data
as 2.43:1.
"'video.x264' track 0: Extracted the aspect ratio information from the
MPEG-4 layer 10 (AVC) video data and set the display dimensions to 854/352."

mplayer tells me the aspect ratio is 16:9 on the original source DVD.
"Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 720x480 => 854x480 Planar YV12"

I would like to resize the video to 640x360 (or maybe 624x352 - some
articles tell me both dimensions must be multiples of 16 - wasn't sure
if that was correct). I am using MPlayer SVN-r29463-4.3.2 and mkvtoolnix
2.98 on 64-bit Linux.

Here are the commands I used:

# dump the movie
mplayer -dvd-device movie.iso dvd://1 -dumpstream -dumpfile
/tmp/dvd-encode/movie.vob

# first video encoder pass
mencoder /tmp/dvd-encode/movie.vob -oac copy -vf
pullup,softskip,crop=720:352:0:62,scale=640:360,harddup
-force-avi-aspect 16:9 -ovc x264 -ofps 24000/1001 -x264encopts
pass=1:threads=auto:bitrate=${VBITRATE}:subq=6:8x8dct:frameref=5:bframes=3:b_pyramid:weight_b:turbo=1
-o /dev/null

# second video encoder pass
mencoder /tmp/dvd-encode/movie.vob -oac copy -vf
pullup,softskip,crop=720:352:0:62,scale=640:360,harddup
-force-avi-aspect 16:9 -ovc x264 -ofps 24000/1001 -x264encopts
pass=2:threads=auto:bitrate=${VBITRATE}:subq=6:8x8dct:frameref=5:bframes=3:b_pyramid:weight_b:turbo=1
-o /tmp/dvd-encode/video.x264

# mux matroska container
mkvmerge -A video.x264 audio.ogg -o movie.mkv



mplayer movie.mkv tells me:
"Movie-Aspect is 2.43:1 - prescaling to correct movie aspect.
VO: [xv] 624x352 => 854x352 Planar YV12"

mplayer video.x264 tells me:
"Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 624x352 => 626x352 Planar YV12"


Thanks,

--John Ratliff



More information about the MEncoder-users mailing list