[MPlayer-users] Scaling and Cropping

Alexander Roalter alex at roalter.it
Sat Aug 18 23:50:00 CEST 2012

On 08/17/2012 09:09 PM, Graham Lawrence wrote:
> I produce encodes with a script, using a 2 pass encode that produces
> an output called movie.2
> If so indicated by cropdetect, as a final step the script crops
> movie.2 to the final encode, movie.avi
> The dvd giving me a problem presents in mplayer as a 720x480 image,
> with an extensive black border on all sides in full-screen
> presentation
> mplayer movie.2 presents as a 720x352 image, with black borders only
> at top and bottom in full-screen
> mplayer movie.avi appears identical to movie.2, but it is not because
> mplayer movie.2 -y 480 is identical to mplayer movie.2, but
> mplayer movie.avi -y 480 is identical to the presentation of the dvd
> I infer from this that this movie crops normally, but will scale only
> in the horizontal direction, not at all vertically.  Is there anything
> that might be done to get it to scale vertically as well?
As Reimar, I also don't really understand what you're trying to say.

But if cropdetect may sometimes fail to detect the black bars if they 
are not actually black. Sometimes, the first and/or last line is light 
gray/green (or sometimes even only half the line, this is the case for 
example with the german Star Wars Ep. IV DVD). Also, on the Star Wars 
III bonus materials (which are optimized for 16x9 display), some 
trailers are presented in 4x3, But stored anamorphically in a 4x3 
display, with black bars on the sides. So, on a 16x9 display, the black 
bars on the side are direcly from the video:

So the video is stored like this:
|  |        |  |
|  |Squeezed|  |
|  |  4x3   |  |
|  | Video  |  |
|  |        |  |

When displayed on a 4x3 display, the player software reads from the 
video information that it is a 16x9 video, so it expands it horizontally 
to 1024x576 (On CRTs, it would squeeze the electron ray to the 16x9 
central area of the screen).
|              |   <- Black bars produced by the Player/TV
|  |Squeezed|  |
|  |  4x3   |  |
|  | Video  |  |
|______________|   <- Black bars produced by the Player/TV

This is Windowboxing, and without a Zoom function of the player, you're 

On a 16x9 display, everything works as intended. The Video gets expanded 
horizontally, and looks OK:

|   |            |   |
|   |(un)Squeezed|   |
|   |    4x3     |   |
|   |   Video    |   |
|   |            |   |
   ^                ^
   `----------------`---- Black bars are not generated by the player, 
but encoded in the video.

If the video was stored as native 4x3 video, the 4x3 would look OK, but 
the 16x9 display would have to detect the non-anamorphic video and add 
the black bars by itself. Somehow, some guys thought this was a bad idea 
and came up with the window-boxed 4x3 clips... Bad decision!


More information about the MPlayer-users mailing list