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 711297 - mpegtsmux output does not include right aspect ratio
mpegtsmux output does not include right aspect ratio
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-omx
1.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-02 16:41 UTC by Markus Fritsche
Modified: 2013-11-05 00:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Markus Fritsche 2013-11-02 16:41:33 UTC
Video files:
Input:    http://reauktion.de/gst/test.ts
Output:   http://reauktion.de/gst/testout.ts

(this video is the same as in https://bugzilla.gnome.org/show_bug.cgi?id=711288)

Command: gst-launch-1.0 filesrc location=test.ts ! progressreport ! tsparse !  decodebin name=demux demux. ! queue ! audioconvert ! voaacenc bitrate=128000 ! queue ! mux. demux. ! queue ! videoconvert ! deinterlace ! videoconvert ! omxh264enc control-rate=1 target-bitrate=1250000 ! "video/x-h264,profile=high" ! queue ! h264parse ! mux. mpegtsmux name=mux ! filesink location=testout.ts

mediainfo testout.ts prints:
Video
ID                                       : 66 (0x42)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.0
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 1 frame
Codec ID                                 : 27
Duration                                 : 3s 200ms
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 5:4
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Comment 1 Markus Fritsche 2013-11-02 17:16:21 UTC
Input:  http://reauktion.de/gst/testsmall.ts
Output: http://reauktion.de/gst/testoutsmall.ts 
Output: http://reauktion.de/gst/testoutsmall.mpg 

=> Test without the aspect ratio change triggering the OMX-Decoder/ Encoder problems.
=> The problem exists for mpegpsmux too.
Comment 2 Jan Schmidt 2013-11-04 11:13:30 UTC
I think you mean that the OMX encoder is failing to include the pixel-aspect-ratio in the H.264 stream. For byte-stream oriented containers like MPEG-PS and MPEG-TS, the pixel-aspect-ratio is entirely in the H.264 elementary data.
Comment 3 Markus Fritsche 2013-11-04 13:31:31 UTC
Hello, 

you are right, I tried 

gst-launch-1.0 filesrc location=testsmall.ts ! progressreport ! tsparse ! decodebin name=demux demux. ! queue ! audioconvert ! voaacenc bitrate=128000 ! queue ! mux. demux. ! queue ! videoconvert ! deinterlace ! videoconvert ! x264enc bitrate=1250 ! "video/x-h264,profile=high" ! queue ! h264parse ! mux. mpegtsmux name=mux ! filesink location=testoutsmall.ts

and it does preserve the aspect ratio, so this bug should be reassigned to gst-omx
Comment 4 Olivier Crête 2013-11-04 13:43:56 UTC
Actually, it's not gst-omx doing it. It's the OpenMAX encoder itself. ou can try without GStreamer, you'll get the same result.
Comment 5 Jan Schmidt 2013-11-05 00:10:19 UTC
It's not surprising that OpenMAX can't correctly set the PAR in the encoder output though: gst-omx doesn't make any attempt to pass a pixel-aspect-ratio on the incoming caps to the encoder.

That said, I can't see a standard way you're supposed to do it. Rpi OMX has 

http://home.nouwen.name/RaspberryPi/documentation/ilcomponents/prop.html#OMX_IndexParamBrcmPixelAspectRatio

which seems to be Broadcom specific. I don't know about other OpenMAX implementations