Page 1 of 1

How can I get the DAR of a video?

Posted: 02 Nov 2010 13:03
by fishstyc
When I use

Code: Select all

libvlc_video_get_aspect_ratio( mediaPlayer )
it returns an empty string.

But I would like to know the Display Aspect Ratio of the file, so I can decode it to another size than the original, compensating for the aspect ratio while decoding already. For example PAL 16:9 has 720x576 should be displayed on a square pixel screen as 720x405.

What am I doing wrong, is there another place or function where I should get this information?

Thanks

Re: How can I get the DAR of a video?

Posted: 02 Nov 2010 13:38
by XilasZ
I don't think you are doing anything wrong, libvlc_video_get_aspect_ratio returns nothing when the aspect ratio has not been set.
Maybe libvlc_video_get_aspect_ratio doesn't returns the DAR defined in the input file, even if vlc handle it correctly, i don't know.