GNOME Bugzilla – Bug 584358
qtmux DAR issue
Last modified: 2009-06-19 16:17:30 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.
what codec have you used. h263 only support a few hardcoded resolutions.
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.
Just verified that this issue also comes up with mp4 files.
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.
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
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).
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.