[MPlayer-dev-eng] Strange vo destination size

Loren Merritt lorenm at u.washington.edu
Wed Sep 14 19:11:55 CEST 2005


On Tue, 13 Sep 2005, Jason Tackaberry wrote:

> However I've run into this peculiar situation on some of my videos:
>
>        $ mplayer t.avi  -vf scale=640:-2,expand=640:480 | grep -i vo
>        VDec: vo config request - 720 x 354 (preferred csp: Planar YV12)
>        VO: [xv] 640x480 => 641x480 Planar YV12
>
> The dest size is ending up as 641x480.  I'm not sure why it scaling at
> all, let alone to an odd size.
>
> FYI:
>        $ mplayer t.avi -identify | grep ID_VIDEO
>        ID_VIDEO_ID=0
>        ID_VIDEO_FORMAT=DIVX
>        ID_VIDEO_BITRATE=1769720
>        ID_VIDEO_WIDTH=720
>        ID_VIDEO_HEIGHT=354
>        ID_VIDEO_FPS=23.976
>        ID_VIDEO_ASPECT=2.4126
>
> This seems like a bug to me, but I wanted to clarify here first.  Is
> this something that needs to be fixed, or is it the case that dsize
> should be necessary?

The issue is that scale=640:-2 can't scale to exactly 1:1 pixel aspect 
ratio, since YV12 is restricted to even resolutions (and even if you used 
YUV444, it would still be restricted to integer resolutions).

Note that in the end it doesn't actually scale to 641x480, that's just the 
display aspect ratio it requests of the -vo. I suppose -zoom -vo x11 might 
end up with RGB 641x480 (I haven't checked), but the rest will round it 
again to YV12.

input          -> res=720x354, dar=2.4126, par=1.1861 -> display=854x354
scale=640:-2   -> res=640x266, dar=2.4126, par=1.0027 -> display=641x266
expand=640:480 -> res=640x480, dar=1.3340, par=1.0027 -> display=641x480

--Loren Merritt




More information about the MPlayer-dev-eng mailing list