GNOME Bugzilla – Bug 711297
mpegtsmux output does not include right aspect ratio
Last modified: 2013-11-05 00:10:19 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
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.
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.
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
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.
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