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 584358 - qtmux DAR issue
qtmux DAR issue
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.x
Other Linux
: Normal normal
: 0.10.13
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-31 14:53 UTC by Christian Fredrik Kalager Schaller
Modified: 2009-06-19 16:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Handle pixel-aspect-ratio (4.46 KB, patch)
2009-06-01 21:08 UTC, Mark Nauwelaerts
committed Details | Review

Description Christian Fredrik Kalager Schaller 2009-05-31 14:53:56 UTC
Been trying to mux a file for my cellphone but it seems gppmux mess up the
Display aspect ratio. The video in question has a pixel height of 176 and pixel width of 144. The pixel aspectratio is 12/11. Which gives a DAR of 1.3333 aka 4/3. But in the 3gpp files I create the DAR ends up as 1.222 instead.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2009-05-31 20:21:20 UTC
what codec have you used. h263 only support a few hardcoded resolutions.
Comment 2 Christian Fredrik Kalager Schaller 2009-05-31 20:29:10 UTC
h263p was the video codec in question. The thing is that the file is correct, mplayer for instance clearly shows the pixel height width before and after PAR being applied with correct values. So this seems to only be a bug in how the value is set inside the 3gpp files atom structure.
Comment 3 Christian Fredrik Kalager Schaller 2009-06-01 15:59:00 UTC
Just verified that this issue also comes up with mp4 files.
Comment 4 Mark Nauwelaerts 2009-06-01 21:08:12 UTC
Created attachment 135771 [details] [review]
Handle pixel-aspect-ratio

At present, pixel-aspect-ratio is ignored (by the container, but an encoder might pick it up).

Anyway, attached patch should handle/record pixel-aspect-ratio, which happens to be different for ISO and QT variants.  If I read things right, neither of these is currently picked up by qtdemux, and other players only seem to pay attention to the ISO way of doing things.

May have a look at qtdemux before pushing further.
Comment 5 Christian Fredrik Kalager Schaller 2009-06-04 16:11:50 UTC
I tried running this pipeline:
gst-launch-0.10 filesrc location=gravity.mpg ! decodebin2 ! ffmpegcolorspace ! videoflip method=0 ! videorate ! videoscale method=1 ! capsfilter caps="video/x-raw-yuv, width=(int)176, height=(int)144, framerate=(fraction)10/1, pixel-aspect-ratio=(fraction)12/11" ! ffmpegcolorspace ! ffmpegcolorspace ! ffenc_h263p ! queue ! capssetter caps="video/x-raw-yuv, pixel-aspect-ratio=(fraction)12/11" ! gppmux ! filesink location=test.3gp

Which uses the capssetter element from gentrans to provide the pixel aspect ratio to the muxer, but I still get a DAR of 1.22
Comment 6 Mark Nauwelaerts 2009-06-04 19:18:10 UTC
For the record, the above pipeline should use a capsfilter
video/x-h263,pixel-aspect-ratio=12/11 instead of capssetter (with incorrect mime-type).  It has been reported to work with this modification (that is, at least, produce the proper DAR).
Comment 7 Mark Nauwelaerts 2009-06-19 16:17:30 UTC
commit b0c0651d7ceec26d3d62e46eabeaa4ad2bc73a18
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Mon Jun 1 23:00:44 2009 +0200

    qtmux (and variants): handle pixel-aspect-ratio.  Fixes #584358.