> I believe DV Video does not have a pixel aspect. It's content is
> either widescreen or not (16:9 / 4:3 if I am not mistaken)

All content has a pixel aspect ratio.
However there may not be any way to determine what this is from the  
file.

>
> Since I didn't find any explanation on how to calculate the correct
> sample_aspect, I figured it out myself.
> I'm not entirely sure that it's correct, but at least it gives the
> correct results.
>
> let's say you got a pal image (720*576) which should be displayed at
> 16:9.

Do not make this assumption.  As it is incorrect.

With the dimensions 704 x 576 is it *very* close to 4:3 or 16:9
However the same pixel aspect ratio is used for 704 x 576 as is 720 x  
576, so 720 x 576 is wider than 4:3 or 16:9


>
>
> I do believe that there is some restriction on these values in some
> codecs, so reducing this fraction to 64 / 45 is probably a good idea.

64:45 is an incorrect pixel aspect ratio.

Here is my handy table which I calculated, I've included the incorrect  
aspect ratio as well.
(taken from http://www.mir.com/DMG/aspect.html)
also wikipedia has an article http://en.wikipedia.org/wiki/Pixel_aspect_ratio
and more references: http://lipas.uwasa.fi/~f76998/video/conversion/

If you are converting from one format to another which both formats  
don't use square pixels, then use the Rec.601 pixel ratios.
But if you are converting to a square pixel format (say divx) then use  
the true square pixels.


NTSC 4:3
8:9 incorrect
10:11 Rec 601 square pixels
4320:4739 true square pixels

NTSC 16:9
32:27 incorrect
40:33 Rec 601 square pixels
5760:4739 true square pixels

PAL 4:3
16:15 incorrect
59:54 Rec 601 square pixels
128:117 true square pixels

PAL 16:9
64:45 incorrect
118:81 Rec 601 square pixels
512:351 true square pixels

I hope this clears up any confusion about Pixel Aspect ratios...

Mark
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to