[MEncoder-users] How to produce VCD\DVD content from a raw AVI video ?

Nicolas George nicolas.george at normalesup.org
Mon Jun 30 10:43:16 CEST 2008


Hi.

Le tridi 13 messidor, an CCXVI, Ross Clement a écrit :
> One thing I found confusing about that page was that it only really mentions
> the expand filter in passing. The complete examples of creating DVDs down
> the bottom only use scale. This means that if your original videos are not
> in the correct (e.g. for PAL) ratio 720x576, then the picture will get
> pulled out of shape. Nowdays when I'm using video that's not already in the
> 720x576 *ratio*, I use a combination of scale and expand. For example, if I
> want videos from my "still" camera (640x480) to become DVD sized, I first
> scale to 720x480 and then expand to 720x576, effectively making the video
> slightly widescreen-ish. Though, as my DVD player doesn't show all of the
> 720x576 screen anyhow, I sometimes scale less (or not at all), and expand
> more. This is only for "home videos", and hence "perfection" is not
> required.

On the general principle, you are right: people should be aware of the need
for the expand filter to adjust the aspect ratio.

But in the particular case you are taking as example, you are totally wrong.

You work under the false assumption that de ratio between the width and the
height of the video in pixel is the same as the ratio between the width and
the height of the video in physical units when it is (correctly) played.
That is not true.

That assumption is mostly true for nowadays screens and resolutions: they
have square pixels, although it was not always the case (some fifteen years
ago, on 4/3 screens, 320×200, 640×400, 640×350 and 640×200 were quite
common). The same is probably true also for your camera.

But most video containers have a field to specify the desired display aspect
ratio. If this aspect ratio does not match the actual pixel aspect ratio of
the screen, players are supposed to prescale the video to adjust for it. For
example, when you play a DVD with mplayer, you can read:

Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
[swscaler @ 0xba2230]720x576 -> 768x576

A lot of players are bogus, and do not honor this field; thus, a lot of
video randomly lying around are set up for square pixels, so that they will
display correctly in most cases.

In the particular case of a PAL DVD, the resolution must be 720×576
(although a few other lower resolutions are possible, almost nobody uses
them), but the display aspect ratio must be either 4/3 or 16/9.

In your particular case, your camera uses the 4/3 aspect ratio, so there is
no need for expand. In fact, if you expand as you said, the resulting image
will be horizontally stretched and vertically squished in a 16/15 ratio.
This is almost unnoticeable, but this is not correct.

The arithmetic to do everything properly is quite confusing. I think it is
possible to let mplayer do it by using the correct combination of dsize and
scale filters, but I did not manage to do it yet.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mencoder-users/attachments/20080630/d17d2ac6/attachment.pgp>


More information about the MEncoder-users mailing list