After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 339408 - setting aspect ratio is not working
setting aspect ratio is not working
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: GStreamer backend
1.4.x
Other Linux
: Normal normal
: ---
Assigned To: Maintainer alias for GStreamer component of Totem
Maintainer alias for GStreamer component of Totem
Depends on:
Blocks:
 
 
Reported: 2006-04-22 16:05 UTC by j^
Modified: 2006-05-26 14:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make 4:3, 16:9 and DVB what the lable says (1.23 KB, patch)
2006-04-22 16:32 UTC, j^
none Details | Review
patching the patch (1.48 KB, patch)
2006-04-24 15:55 UTC, j^
committed Details | Review

Description j^ 2006-04-22 16:05:12 UTC
trying to manualy set the aspect ratio to something like 4:3 or 16:9
the image is scaled the wrong way. 
checking it with PAL resolution, setting it to 4:3 it is about 16:9,
which could indicate that pixel aspect ratio and frame aspect ratio
are mixed up. on the gui level nobody wants to set a 4:3 pixel aspect ratio...
Comment 1 j^ 2006-04-22 16:32:42 UTC
Created attachment 64112 [details] [review]
make 4:3, 16:9 and DVB what the lable says

make 4:3, 16:9 and DVB what the lable says;
i did not change Square from being square pixels to being a square image.
Comment 2 Julien MOUTTE 2006-04-23 20:02:58 UTC
Just want to double check some points with you.

What totem does is :

1) Get the pixel aspect ratio of your monitor from the X API. Sometimes X can get that wrong so you can adjust it in xorg.conf if that's the case pretty rare (though). In most case your pixels are square.

2) Get the pixel aspect ratio of the movie you are playing. This can be wrong as well because of a badly muxed format or a poor container format that doesn't handle this right.

3) Calculate the scaling required to display the movie with its PAR correctly on your screen with its PAR.

What the pixel aspect ratio in Totem's menu does is enforce the parameter from 2). Indeed getting X to report your screen geometry correctly is your job in xorg.conf because it's rare, but being able to force the PAR of the movie you are playing is indeed usefull for a lot of movies.

So basically if you play a movie and the aspect ratio looks wrong and you believe this is a 4:3 PAR video but the format reports square you can force it to 4:3 and it should look right on your screen no matter if the screen's pixels are square or not.

Now that we have a common understanding of what this is feature does can you confirm you are still seeing a bug?

Thanks and regards.

Julien,
Comment 3 j^ 2006-04-23 22:24:30 UTC
just to clear that up totem does not list 4:3 pixel aspect ratio
but 4:3, 16:9 and DVB image aspect ratios. 

now the current code in totem does set it to 4:3 pixel aspect ratio.

my argument is: 
 the only thing one would want with 
 menu entries labled 4:3 and 16:9, is image aspect ratio.
 (4:3 and 16:9 beeing the most common image aspect ratios of screens, tv and dvds)

with that understanding i think its a bug.

ps: note i dont use PAR since its confusing, 
    could be pixel or picture, have seend both uses.
Comment 4 Julien MOUTTE 2006-04-24 09:45:52 UTC
Fixed in CVS head of Totem. (Patch applied)
Comment 5 j^ 2006-04-24 15:55:22 UTC
Created attachment 64215 [details] [review]
patching the patch

ok, totaly fucked that up. 
the old patch used width and height the wrong way around.
PAR = pixel aspect ratio / DAR = display aspect ratio

DAR_n = PAR_n * width   // i.e. 4 = PAR_n * 720
DAR_d = PAR_d * height  //      3 = PAR_d * 576

transforming this to calculate PAR:

PAR_n  = DAR_n * height   // i.e. PAR_n = 4 * 576
PAR_d  = DAR_d * width    //      PAR_n = 3 * 720
Comment 6 Tim-Philipp Müller 2006-05-26 14:50:19 UTC
I've just committed this to totem HEAD, would be great if you could check that I didn't break anything.


 2006-05-26  Tim-Philipp Müller  <tim at centricular dot net>

        * src/backend/bacon-video-widget-gst-0.10.c: (get_media_size):
          Avoid integer overflows when doing aspect ratio calculations.

        * configure.in:
          Require gst-plugins-base >= 0.10.7 for the GStreamer backend
          for the recently added gst_video_calculate_display_ratio()
          function used above.