Last modified: 2011-05-15 09:56:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18149, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16149 - Non-square pixel aspect ratios are not detected properly for Ogg thumbnailing, Cortado player
Non-square pixel aspect ratios are not detected properly for Ogg thumbnailing...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
OggHandler (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://commons.wikimedia.org/wiki/Fil...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-27 19:39 UTC by Brion Vibber
Modified: 2011-05-15 09:56 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2008-10-27 19:39:17 UTC
Video formats frequently allow specifying non-square pixels; for instance NTSC DVDs at 720x480 may have either "tall" pixels (for classic 4:3 screen) or "wide" pixels (for a 16:9 widescreen picture).

Currently we don't take this into account and assume pixels will be square; as a result, a video with non-square pixels will appear displayed squished or stretched.

The raw pixel size should probably be scaled to a "display" pixel size; thumbnails can be generated at that size and the player widgets can be stretched at that aspect ratio.

(QuickTime appears to properly scale the picture to its proper aspect ratio within the plugin window, but Cortado just stretches the video to fit whatever size you specified. Haven't tested Firefox 3.1 video element yet.)

I've made a 720x480 widescreen version of the fundraising PSA video, which I'll upload somewhere shortly as an example.
Comment 1 Ilmari Karonen 2009-02-05 00:14:25 UTC
Some related discussion at http://commons.wikimedia.org/wiki/Commons:Village_pump#Cortado_Java_Applet
Comment 3 Brion Vibber 2009-02-13 01:44:42 UTC
Looks like I totally forgot to upload the test video, but I've linked to one of the Al-Jazeera videos described in the discussion above which demonstrates the problem:

http://commons.wikimedia.org/wiki/File:Aljazeeraasset-GAZAATTACKD29128D540.ogv

This is a 16:9 PAL video; 720x576 pixel source should display stretched to 1024x576. Note that the file has correct metadata; VLC displays it at the proper aspect ratio.
Comment 4 Gregory Maxwell 2009-06-01 05:01:50 UTC
Cortado itself has been correct since r48131.

This issue now appears limited to the ffmpeg generated thumbnails.

Comment 5 Sisa 2010-01-06 20:36:48 UTC
Is there no possibility to fix the aspect ratio of the generated thumbnails?
I am not a programmer, but there are at least 2 ways to get the proper properties of the media files:
1) the command "ffmpeg -i xxx.ogg" returns it as an error code. 
2) use mediainfo (open source) to get the aspect ratio
By using this information, the correct resizing with ffmpeg is not a problem..





 
Comment 6 Gregory Maxwell 2010-01-06 22:02:29 UTC
Wikimedia no longer uses ffmpeg for thumbnail generation. oggThumb can correctly handle pixel aspect, so I think all that needs to be fixed up is the ogghandler side.
Comment 7 Sisa 2010-01-07 00:09:45 UTC
Thank you for your friendly information. 

Searching for "oggThumb" i found this (http://dev.streamnik.de/75.htm):

 -s Picture output size. The thumbnail is created in the size given as <width>x<height>.  If you want to include the thumbnails into your webpage and you need to have a fixed width but dynamic height, you can set the dynamic axis to 0. So the aspect ratio of the video frame is kept. This is the same for setting width or height to 0. Example: -s 0x100 

So I think it will not be so difficult to fix this bug.
Thumbnails with wrong aspect ratio in a Wikipedia page look really strange (and my camera produces videos in anamorphic 16:9). 

Last of all: sorry for my poor English...



Comment 8 Derk-Jan Hartman 2010-03-24 14:35:24 UTC
Note: XiphQT doesn't seem to support square pixels either.
Comment 9 Derk-Jan Hartman 2010-03-24 14:47:42 UTC
(In reply to comment #8)
> Note: XiphQT doesn't seem to support square pixels either.

Reported as:
https://trac.xiph.org/ticket/1666
Comment 10 Derk-Jan Hartman 2010-05-05 01:25:06 UTC
Fixed non-square pixels for OggHandler in r65927.
Comment 11 Sisa 2010-05-05 15:24:02 UTC
Thanks and 2 questions: when will it be available in the standard software used by commons/wikipedia and what must be done to fix the ratio in the thumbnails of existing videos?
Comment 12 Derk-Jan Hartman 2010-05-05 18:52:56 UTC
The answer to the first question is not my calle. It likely will be in 1.17 and 1.16 has not even been released yet, so probably a few more months at the very least.

Note that this does not fix the size of the thumbnails. The thumbnails are generated by ffmpeg or oggThumb, which both should work now (if you download the thumbnail you should be able to verify). This fixes how the thumbs are displayed by MediaWiki in the HTML and at most it requires an action=purge of the imagedescription page.
Comment 13 Sisa 2010-05-05 22:39:42 UTC
OK, I will wait and carry on produce anamorphic clips for wikipedia...
Thanks again!
Comment 14 Sisa 2011-02-24 15:28:01 UTC
Thanks, now thumbnails are working correct. 
However a new minor bug is introduced now: the resolution of the files is wrong interpreted in the description of the files (example: http://commons.wikimedia.org/wiki/File:Meligethes_aeneus_720x576.og . The resolution of 720x576 is displayed as 1,024×576 pixels.)
Comment 15 Derk-Jan Hartman 2011-04-28 11:23:51 UTC
That depends on your definition of correct.

The actual display size is 1024x576 pixels. The storage size is different indeed, but that is not something that we care about at the front end.

Closing this and moving the xiphQT issue to a new separate bug 28732.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links