GNOME Bugzilla – Bug 549625
Show video aspect ratio
Last modified: 2011-04-06 01:56:57 UTC
Please describe the problem: This bug has been reported here: https://bugs.launchpad.net/ubuntu/+source/totem/+bug/261168 If I play my DVD (recorded with a webcam that stores movies into mini-DVDs) with totem the movie is showed correctly, that is with the correct aspect ratio that in my case should be equal to 1024x576 (16:9 proportion), but the properties window shows a wrong movie dimension: 720x576 (4:3). I think it's the size of vob file If I play the same dvd with, for example, mplayer I see the following output (from console) --------------------------------------------------------------------------------- marco@dominus:~$ mplayer dvd:// MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team CPU: Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz (Family: 6, Model: 15, Stepping: 13) CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled with runtime CPU detection. mplayer: could not connect to socket mplayer: No such file or directory Failed to open LIRC support. You will not be able to use your remote control. Playing dvd://. *** Zero check failed in ifo_read.c:436 for vmgi_mat->zero_3 = 0x00000000010000000000000000000000000000 There are 1 titles on this DVD. There are 1 chapters in this DVD title. There are 1 angles in this DVD title. audio stream: 0 format: ac3 (stereo) language: unknown aid: 128. number of audio channels on disk: 1. number of subtitles on disk: 0 MPEG-PS file format detected. VIDEO: MPEG2 720x576 (aspect 2) 25.000 fps 9400.0 kbps (1175.0 kbyte/s) xscreensaver_disable: Could not find XScreenSaver window. GNOME screensaver disabled ========================================================================== Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES) Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale] The selected video_out device is incompatible with this codec. Try appending the scale filter to your filter list, e.g. -vf spp,scale instead of -vf spp. VDecoder init failed :( Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2)) ========================================================================== ========================================================================== Forced audio codec: mad Opening audio decoder: [liba52] AC3 decoding with liba52 Using SSE optimized IMDCT transform Using MMX optimized resampler AUDIO: 48000 Hz, 2 ch, s16le, 256.0 kbit/16.67% (ratio: 32000->192000) Selected audio codec: [a52] afm: liba52 (AC3-liba52) ========================================================================== AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample) Starting playback... VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12) VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1.78:1 - prescaling to correct movie aspect. VO: [xv] 720x576 => 1024x576 Planar YV12 A: 4.0 V: 3.9 A-V: 0.006 ct: 0.111 552/552 8% 0% 0.7% 0 0 GNOME screensaver enabled Exiting... (End of file) -------------------------------------------------------------------------------------------- As you can see mplayer shows that it prescales to correct movie aspect (1024x576) the mpeg2 video 720x576. Steps to reproduce: 1. play a DVD with totem (format of the movie 1024x576 while format of the vob is 720x576) 2. open properties menu 3. watch at the size fields Actual results: Totem displays wrong DVD movie dimension Expected results: Totem should display DVD movie size equals to 1024x576 Does this happen every time? yes Other information:
Where does it show the wrong dimensions? Is it during playback, or using the properties tab in nautilus? Which backend were you using? Can you make the files available for testing?
Wrong dimensions are displayed in the tab properties of totem. My totem player is based on GStreamer 0.10.18 My system is Ubuntu Hardy Heron (8.04 LTS) I will post to you, as soon as possible, some screenshots and eventually a little .iso DVD image (that obviously you have to burn) for testing.
@Bastien, before I post to you all the files I promised I have a question to you: what is the intended behavoir of totem about size properties about movies and DVD? That is if I have a single movie file I think totem should obviously display the right size. But if I have a DVD the things are more complex: in fact I know (but I may be wrong) that a DVD is made up, from the others, by VOB files (that have a size) and .IFO files in which a player should find the correct size to which it should rescale the VOB file to play DVD correctly. The point is: should totem, in properties size, display the vob file dimension or the dvd size (vob size + rescaling)? I suspect that totem, as already I sayd, only displays vob size.
It's supposed to show the original size of the current stream.
@Bastien, I did some studies about the presumed problem I posted and it seems that the input stream has the ratio displayed by Totem. The fact that the player rescales the frame to correct ratio (the wide frame stored in DVD is in anamorphic mode) seems to be a "post" operation. So if the field display is referred to input stream Totem runs ok. If it is referred to the output stream Totem doesn't run ok. If the Totem behaviour is correct I think we can submit in the wishlist the option to include in Totem properties also the output ratio info (almost when Totem plays video DVDs) else I think a user (like me) could be deceived as he read an info that doesn't refer to the video display ratio.
The GStreamer backend uses the data straight from GStreamer itself, reassigning. /* We need at least width/height and framerate */ if (!(gst_structure_get_fraction (s, "framerate", &bvw->priv->video_fps_n, &bvw->priv->video_fps_d) && gst_structure_get_int (s, "width", &bvw->priv->video_width) && gst_structure_get_int (s, "height", &bvw->priv->video_height))) return;
Totem has available all the information it needs to display the information the user wants -> to be able to find out the size Totem will use for '1:1' display on their screen... which is a calculation that also depends on the pixel aspect ratio of the output device. It's 1024x768 on (for e.g.) an LCD panel with square pixels, but will be something different on a screen with non-square pixels. It'd also change when Totem overrides the display aspect ratio explicitly. Personally, I usually want to see the encoding resolution, which is the 720x576 size. Information about the calculated display size would only be useful to check that Totem is getting the right information about the display device's pixel-aspect-ratio.
Reassigning the bug to Totem as an enhancement -> effectively the bug seems to be that the user would like to see both Display Size and Video Resolution in the totem properties tab.
*** Bug 584371 has been marked as a duplicate of this bug. ***
I disagree with you Jan, wanting to see the pixel width and height is a very developer centric solution I think. A normal user would probably want to see the width and height of what he/she is actually seeing on screen, which is result of pixel height/width combined with the pixel-aspect-ratio.
I think totem should display both output stream display size of the movie and the encoding resolution.
(In reply to comment #10) > I disagree with you Jan, wanting to see the pixel width and height is a very > developer centric solution I think. A normal user would probably want to see > the width and height of what he/she is actually seeing on screen, which is > result of pixel height/width combined with the pixel-aspect-ratio. To show the 'display size', the other factor is the shape of the pixels on the display device. That's usually 1:1, but not always. It still sounds to me like you're talking about changing from a meaningful number that represents the encoded quality of the video to one that doesn't seem to tell the user anything useful.
Well one could argue that these values have no value to the normal user anyway, but I would assume that a normal user who looks at his screen and sees a non-square video there will just get confused and assume the properties field is buggy if the sidebar claims it is 100x100
(In reply to comment #13) > Well one could argue that these values have no value to the normal user anyway, > but I would assume that a normal user who looks at his screen and sees a > non-square video there will just get confused and assume the properties field > is buggy if the sidebar claims it is 100x100 If somebody wants to show the video aspect ratio in there, be my guest, but showing the aspect-ratio modified sizes (or the screen's aspect ratio) could get very broken as soon as you move Totem to another screen, or when using the external display. I don't think we want to get into that. And I'd argue that both sets of dimensions are useless to the user, though the encoded dimensions actually have a use for checking encoding quality.