[Ffmpeg-devel] DAR and SAR FFmpeg option confusion

Roman Shaposhnik rvs
Tue Mar 13 19:44:17 CET 2007


Hi

On Tue, 2007-03-13 at 18:29 +0000, M?ns Rullg?rd wrote:
> >   What is lying in your opinion ? The codec ? The SPEC ? The
> > information presented here ?
> >        http://www.mir.com/DMG/aspect.html
> >   Please be more specific.
> 
> You can't have SAR=10:11, DAR=4:3 and size=720x480, all at the same time.
> The maths simply don't work out.

  The math don't work out because you've just invented it. Sorry. The
math in the link quoted above is:
      SAR=10:11, DAR=15:11, size=720x480
                    OR
      SAR=10:11, DAR=4:3, size=702x480

  And this is quite correct. The only problem is -- currently I can't
quite express it with ffmpeg short of biting the bullet and admitting
that DV, SVCD (and a couple of others) DARs are really 15:11 for what
everybody considers to be a 4x3 frame. And that's ok with me if that's
what we really want to tell users.

> >    Which numbers and why do you think they are inconsistent ? Once
> > again, please go read: http://www.mir.com/DMG/aspect.html and if
> > you find yourself in disagreement with what's written there then we
> > can talk about it meaningfully. The numbers Robert and I quoted are
> > very consistent with what's written as part of the resource mentioned
> > above.
> 
> If you have encoded 720x480 pixels, and want to display it with DAR=4:3
> and SAR=10:11, you'll have to crop the image. 

  Of course! No disagreement there. BUT HOW DO I EXPRESS THAT FACT ?
Once again -- currently as Robert pointed out the only way we can solve
this is to admit that a DAR of a non-cropped image is 15:11.

>  Alternatively, you could
> use a wider DAR to keep the full image and SAR, or use a different SAR
> to fit all the pixels in DAR=4:3.  The web page you reference states that
> cropping is the correct thing to do.

  I don't disagree here as well. Its just that I was imagining that
libavcodec could be somehow informed of the "cropping" thing. Basically
having a way to express that even though the encoded frame is 720x480
the DISPLAYED one should really be 702x480 would solve the problem for
me and not force 15:11 DARs upon everybody. I see that we've got
AVCodecContext::coded_width/coded_height but I don't think they are
there for quite the purpose I've just described.

  Does it make it clear(er) ?

Thanks,
Roman.





More information about the ffmpeg-devel mailing list