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 575738 - mpeg2enc's aspect parameter does not work properly
mpeg2enc's aspect parameter does not work properly
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.12
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-17 19:17 UTC by gnucash
Modified: 2009-03-30 19:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description gnucash 2009-03-17 19:17:35 UTC
I did a reencode of video with aspect=2 but when I examine the sequence header the aspect_ratio_information field is 12, not 2. According to table 6-3 of ISO 13818-2 12 is a reserved value.  Also, it is not what I specified.

In addition, the documentation gst-inspect shows for aspect= might be slightly misleading.  When aspect_ratio_information==1 it means that the pixels are square, not that the width:height ratio is 1:1.  An 800x400 video with aspect_ratio_information==1 will be very rectangular and not in the least bit square.
Comment 1 Mark Nauwelaerts 2009-03-25 21:19:33 UTC
The documentation that gst-inspect shows for aspect-ratio might be slightly misleading, but only for the case == 1, and unfortunately mainly due to the necessarily concise nature of the cases' descriptions.  Slightly more elaborate versions that should normally provide more clarity can be found in the man-page for mpeg2enc, whose options are closely paralleled in the plugin.  Unfortunately, it is quite misleading (and possibly even wrong) for this option in there also ...

On the more technical matter; are you sure that an MPEG2 format/profile was selected (?).  As the man-page says (and a further look in mpeg2enc code shows), the specified aspect ratio is used directly for MPEG2, but it may be translated/transformed for MPEG1, in which case 12 is one of the possible outcomes.
Comment 2 Mark Nauwelaerts 2009-03-30 19:34:13 UTC
Using mjpegtools 1.9, the following pipeline:
----
gst-launch -v videotestsrc num-buffers=1 ! mpeg2enc format=3 aspect=2 ! filesink location=temp.m2v
----
produces output that starts as follows:
----
00000000  00 00 01 b3 14 00 f0 25  02 bf 63 80 00 00 01 b5  |.......%..c.....|
----
which should mean:
00 00 01 b3: start code
14 0: width 320
0 f0: height 240
2: aspect ratio