How can I get the DAR of a video?

This forum is about all development around libVLC.
fishstyc
Blank Cone
Blank Cone
Posts: 40
Joined: 19 Oct 2010 12:39

How can I get the DAR of a video?

Postby fishstyc » 02 Nov 2010 13:03

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

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

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

Postby XilasZ » 02 Nov 2010 13:38

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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 15 guests