How can I get the actual Display Aspect Ratio ?
Posted: 16 Jan 2016 10:08
Hi,
I'm using libvlc 2.1.3 to show logo on the screen, I need to know the actual Display Aspect Ratio(DAR) in the media file, so I call the libvlc_video_get_aspect_ratio function, but it returns null.
I use mediainfo utility, found the DAR in the media file is 4:3, how can I get this 4:3 with libvlc ? I don't want to use an additional mediainfo.dll.
The reason I need DAR is I want to show logo in the middle of the screen with different media file which has different resolution, I need to calculate the resolution of the render screen size and put the logo to the correct position.
Or, Who can tell me how I can get the actual render size by libvlc, for example, the video size is 720x480, when I get a snapshot with default aspect ratio, I get a png file which is 853 x 480, How can I get this 853 x 480 ?
Thanks !
dongxf
I'm using libvlc 2.1.3 to show logo on the screen, I need to know the actual Display Aspect Ratio(DAR) in the media file, so I call the libvlc_video_get_aspect_ratio function, but it returns null.
I use mediainfo utility, found the DAR in the media file is 4:3, how can I get this 4:3 with libvlc ? I don't want to use an additional mediainfo.dll.
The reason I need DAR is I want to show logo in the middle of the screen with different media file which has different resolution, I need to calculate the resolution of the render screen size and put the logo to the correct position.
Or, Who can tell me how I can get the actual render size by libvlc, for example, the video size is 720x480, when I get a snapshot with default aspect ratio, I get a png file which is 853 x 480, How can I get this 853 x 480 ?
Thanks !
dongxf