Determine the aspect ratio of the movie

Just have a drink and chat
menny
New Cone
New Cone
Posts: 1
Joined: 19 Apr 2009 13:46

Determine the aspect ratio of the movie

Postby menny » 19 Apr 2009 13:58

Hi all,
This is an off-VLC question, but I thought that VLC developers will be able to help me.
I'm writing a video player software which relay of avcodec (ffmpeg). I understand that VLC does the same.

I stumble upon a problem with determining the aspect ratio of the video file, let me explain:
When I decode a video file with avcodec, I also get a struct which tells me what is the resolution of the video (e.g., 640x480 (vga), 704x576(4cif), 704x288 (2cif), etc).
I also get the pixel aspect ratio (e.g., 1:1, 12:11).

The problem is that sometimes the decoded resolution and the video size to display, are not the same - 2cif is an excellent example for this:
The decoded resolution is 704x288, the pixel aspect ratio is 12:11 but the actual video size to be displayed should be 704x576!

I was wondering how VLC solves this problem in a generic way?

Thanks ahead,
Menny

Arite
Big Cone-huna
Big Cone-huna
Posts: 2478
Joined: 26 Jun 2007 20:40
VLC version: 3.0.20
Operating System: Debian Testing|Win10

Re: Determine the aspect ratio of the movie

Postby Arite » 26 Apr 2009 02:26

Moved to Coffee Corner (the place for non-VLC discussion).

Arite.
Don't use PMs for support questions.


Return to “Coffee Corner”

Who is online

Users browsing this forum: No registered users and 15 guests