Hello,
We are building a gateway to convert between several media formats. The gateway is based on a Jetson AGX Xavier and the software builds different GStreamer pipelines, depending on the media types it needs to process.
We were recently asked to support RTP streams generated by a Xilinx-based board and we could not decode them using nvv4l2decoder. We recorded the H.265 payload of those streams as Matroska files and decoding them using gst-launch-1.0
yields these errors:
> gst-launch-1.0 filesrc location=10-bit-2.mkv ! matroskademux ! h265parse ! nvv4l2decoder ! nvvidconv ! nv3dsink
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE
Opening in BLOCKING MODE
Pipeline is PREROLLING ...
NvMMLiteOpen : Block : BlockType = 279
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 279
(gst-launch-1.0:9110): GStreamer-CRITICAL **: 12:02:13.441: gst_caps_remove_structure: assertion 'idx < gst_caps_get_size (caps)' failed
(gst-launch-1.0:9110): GStreamer-CRITICAL **: 12:02:13.441: gst_caps_remove_structure: assertion 'idx < gst_caps_get_size (caps)' failed
(gst-launch-1.0:9110): GStreamer-CRITICAL **: 12:02:13.442: gst_caps_remove_structure: assertion 'idx < gst_caps_get_size (caps)' failed
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:00.000689824
Setting pipeline to NULL ...
Freeing pipeline ...
Replacing the nv3dsink
with a filesink
gets rid of the errors but generates an empty file:
> gst-launch-1.0 filesrc location=10-bit-2.mkv ! matroskademux ! h265parse ! nvv4l2decoder ! nvvidconv ! filesink location=tmp.raw
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE
Opening in BLOCKING MODE
Pipeline is PREROLLING ...
NvMMLiteOpen : Block : BlockType = 279
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 279
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:00.000488992
Setting pipeline to NULL ...
Freeing pipeline ...
> ll tmp.raw
-rw-rw-r-- 1 bisect bisect 0 Dec 2 12:09 tmp.raw
However, avdec_h265
decodes the files correctly with a similar pipeline:
gst-launch-1.0 filesrc location=10-bit-2.mkv ! matroskademux ! h265parse ! avdec_h265 ! videoconvert ! ximagesink
This happens with 4:2:0 content, both 8 and 10 bit. Here is the output of mediainfo
for the 10-bit file:
> mediainfo 10-bit-2.mkv
General
Unique ID : 215386674912513167907874724445387356410 (0xA209F6F581247B1005F50F408E55F8FA)
Complete name : 10-bit-2.mkv
Format : Matroska
Format version : Version 2
File size : 190 KiB
Encoded date : UTC 2021-09-27 09:51:34
Writing application : GStreamer Matroska muxer
Writing library : GStreamer matroskamux version 1.14.5
IsTruncated : Yes
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L4.1@Main
Codec ID : V_MPEGH/ISO/HEVC
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 3.175 FPS
Original frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 0)
Bit depth : 10 bits
Title : Video
Language : English
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
I appreciate any suggestion on how to overcome this problem.
Thanks in advance,
Pedro