[MPlayer-users] Embedding video aspect in mpeg1

Giacomo Comes comes at naic.edu
Thu Nov 10 18:14:02 CET 2005


On Thu, Nov 10, 2005 at 06:19:14AM +0800, Heimdall Midgard wrote:
> While playing around with encoding to VCD-compliant mpeg1, I
> discovered a quirk with the aspect options used to embed the
> video's width-to-height ratio.
> 
> Both "-lavcopts aspect=4/3" and "-mpegopts vaspect=4/3"
> appear to produce video with the correct aspect when played
> by mplayer, but *NOT* when played by other free software
> players, namely VLC and Xine.
> 
> VLC and Xine apparently interpret the aspect as something
> closer to 16/9 (squished). The command I use is:
> 
> mencoder -oac lavc -ovc lavc \
> -lavcopts acodec=mp2:abitrate=224:\
> vcodec=mpeg1video:vbitrate=1150:vrc_buf_size=327:\
> vrc_minrate=1150:vrc_maxrate=1150 \
> -of mpeg -mpegopts format=xvcd:vaspect=4/3 \
> -vf pullup,softskip,scale=352:240,harddup \
> -af resample=44100 -ofps 24000/1001 \
> -o output.mpeg input.avi
> 
> I know there's a note in the man page for "-lavcopts
> aspect=" that "only MPlayer will play these files correctly,
> other players will display them with wrong aspect." Does
> this apply to "-mpegopts vaspect=" as well?
> 
> Is there a way to embed the aspect so that it can be read
> correctly by other software players. VLC and Xine can play
> the VCDs and DVDs I rented or ripped with the correct
> aspect, so I know that the two players can read the aspect
> of some mpeg streams properly.
> 
> I am using MPlayer dev-CVS-051107-08:26-4.0.3.

mencoder will usually set the appropriate aspect ratio 
for mpegs (except for a couple of uncommon configurations)
and 4/3 and 16/9 aspects always work.
(well, I'm talking about releases, I use CVS less often and I
don't know if recently CVS did break something. You didn't
mention what version of mplayer you are using).


MPlayer will display something like this when you play the mpeg:

VIDEO:  MPEG1  352x240  (aspect 2)  29.970 fps  1152.0 kbps (144.0 kbyte/s)
and
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [xv] 352x240 => 352x264 Planar YV1

If that is what you have, then the mpeg aspect IS fine and
the problem is somewhere else.

Giacomo




More information about the MPlayer-users mailing list