ACCELERATED GSTREAMER USER GUIDE RESULTS

I set my TX1 up with JetPack and Ubuntu 16.04LTS and everything seems to be in order. I am following the Accelerated Gstreamer User Guide 24.2.1 and installed the missing components of Gstreamer1.0 not included in the JetPack load. Gstreamer Version:

gst-inspect-1.0 version 1.8.1
GStreamer 1.8.3

Most of the provided video pipelines work fine. However, when I try to run the following video pipelines from the user’s guide, I get errors which I am sharing for your information. The only ones I really care about resolving are H.265.

H.265 Decode (NVIDIA accelerated decode) {page 4} I used a videotestsrc produced file.

gst-launch-1.0 filesrc location=test.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h265parse ! omxh265dec ! nvoverlaysink -e
Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and MjstreamingPipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstQTDemux:demux: Delayed linking failed.
Additional debug info:
./grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstQTDemux:demux:
failed delayed linking pad  video_0 of GstQTDemux named demux to some pad of GstQueue named queue0
ERROR: from element /GstPipeline:pipeline0/GstQTDemux:demux: GStreamer encountered a general stream error.
Additional debug info:
qtdemux.c(5520): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstQTDemux:demux:
streaming stopped, reason not-linked
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

I also tried an h.265 encoded file from here: http://h265.webmfiles.org/video-h265.mkv It plays fine in my media player. Traceback is different:

gst-launch-1.0 filesrc location=h265.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h265parse ! omxh265dec ! nvoverlaysink -e
Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and MjstreamingPipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstQTDemux:demux: This file is invalid and cannot be played.
Additional debug info:
qtdemux.c(699): gst_qtdemux_pull_atom (): /GstPipeline:pipeline0/GstQTDemux:demux:
atom has bogus size 440786851
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

I also tried an h.265 encoded file from videotestsrc but got the same traceback

Multiple displays {page 5 top}

gst-launch-1.0 filesrc location=test.mp4 ! qtdemux name=demux demux.video_0 ! queue ! omxvp8dec ! nvoverlaysink display-id=1 -e
Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and MjstreamingPipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstQTDemux:demux: Delayed linking failed.
Additional debug info:
./grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstQTDemux:demux:
failed delayed linking pad  video_0 of GstQTDemux named demux to some pad of GstQueue named queue0
ERROR: from element /GstPipeline:pipeline0/GstQTDemux:demux: GStreamer encountered a general stream error.
Additional debug info:
qtdemux.c(5520): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstQTDemux:demux:
streaming stopped, reason not-linked
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

MPEG-4 Decode (NVIDIA accelerated decode)

gst-launch-1.0 filesrc location=test.mp4 ! qtdemux name=demux demux.video_0 ! queue ! mpeg4videoparse ! omxmpeg4videodec ! nveglglessink -e
Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and MjstreamingPipeline is PREROLLING ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
WARNING: from element /GstPipeline:pipeline0/GstQTDemux:demux: Delayed linking failed.
Additional debug info:
./grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstQTDemux:demux:
failed delayed linking pad  video_0 of GstQTDemux named demux to some pad of GstQueue named queue0
ERROR: from element /GstPipeline:pipeline0/GstQTDemux:demux: GStreamer encountered a general stream error.
Additional debug info:
qtdemux.c(5520): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstQTDemux:demux:
streaming stopped, reason not-linked
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...

Notice the pipeline did not get free’ed

Image Encode

gst-launch-1.0 videotestsrc num-buffers=1 ! 'video/x-raw,width=(int)640, height=(int)480, format=(string)I420' ! nvjpegenc !filesink location=test.jpg -e
bash: !filesink: event not found

As you can tell, I am getting a lot of errors. Then I saw the instructions to build Gstreamer (on page 21 of the user guide - in my opinion this should be at the beginning). I am going to follow the instructions for version 1.6.0 as instructed in the tutorial. If all these errors will be resolved by following this step, please disregard. If not, please help me get the H.265 decode examples working.

I built gstreamer manually as shown in the user guide. The only error I had during build was because the directory:

cd /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/

didn’t exist. However,

cd /usr/lib/aarch64-linux-gnu/gstreamer-1.0/

did exist and all the requisite files were in there.
I then ran some of the code from before and got the following traceback:

gst-launch-1.0 filesrc location=test.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h265parse ! omxh265dec ! nvoverlaysink -e

(gst-launch-1.0:27809): GStreamer-WARNING **: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstisomp4.so': /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstisomp4.so: undefined symbol: gst_codec_utils_opus_create_caps
WARNING: erroneous pipeline: no element "qtdemux"

Actually, all my decode pipelines give me this error. How do I fix it or go back?
How else can I get the H.265 decoding to work on my TX1?

I got the following traceback when executing both the “set number of B frames between two reference frames” and “insert SPS and PPS at IDR” pipelines on page 9.

gst-launch-1.0 videotestsrc num-buffers=200 ! 'video/x-raw, width=(int)1280, height=(int)720, format=(string)I420' ! omxh264enc num-B-Frames=2 ! qtmux ! filesink location=test.mp4 –e
WARNING: erroneous pipeline: syntax error

Turns out the “-” in “-e” is not the right dash, even though it was copied right out of the tutorial. Replacing the - got the pipelines running without errors.

gst-launch-1.0 videotestsrc num-buffers=200 ! 'video/x-raw, width=(int)1280, height=(int)720, format=(string)I420' ! omxh264enc num-B-Frames=2 ! qtmux ! filesink location=test.mp4 -e

In the camera capture section on page 10-11, I got the following error on “raw-yuv Capture (I420 format) and preview display with xvimagesink”

gst-launch-1.0 v4l2src device="/dev/video0" ! "video/x-raw, width=640, height=480, format=(string)I420" ! xvimagesink -e
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
^C

No window came up at this resolution. I changed the resolution to “width=(int)1280, height=(int)720” and a blank screen popped up, but no image from the camera - same error “-not negotiated”.

This is a pipeline I am very interested in getting operational. Thanks!

The nvgstplayer-1.0 application pipeline on page 11 did not bring up a window of any size (not clear if it was supposed to, but it is implied)
One of the quote marks in raw-yuv Input Formats pipeline didn’t copy over right…

gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420’ ! omxh264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location=test.mp4 -e

It’s the one after format=(string)I420
raw-gray Input Formats had weird quotes too.
Sample CSI Camera pipeline on page 17 failed to run:

gst-launch-1.0 nvcamerasrc fpsRange="30 30" ! 'video/xraw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)I420, framerate=(fraction)30/1' ! nvtee ! nvivafilter cuda-process=true customer-lib-name="libnvsample_cudaprocess.so" ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! nvoverlaysink -e 
WARNING: erroneous pipeline: could not link nvcamerasrc0 to nvtee0

This is another pipeline I am very interested in getting operational.

That’s about it. I would really like a pipeline that will let me take in a live video feed, encode it with a constant bitrate with H.265 and post it to an IP sink.

Hi Dan,
Currently, qtmux and qtdemux do not support video/x-h265. Please use matroskamux and matroskademux.

You can check the capability via ‘gst-inspect-1.0 qtmux’

Thanks for responding DaneLL. Which error are you referring to? Is the gstreamer user guide incorrect or do you think something is wrong on my end? (I copied the examples right out of the guide)

Hi Dan,
Please refer to the link for h265 encoding/decoding
https://devtalk.nvidia.com/default/topic/1002327/jetson-tx1/hardware-accelerated-video-encoding-with-gstreamer/post/5122103/#5122103

How to play .ts file with gst-launch-1.0 ,
or how to get a video contained in .ts file played ?
References:
https://devtalk.nvidia.com/default/topic/1004977/jetson-tx2/vlc-not-working-on-l4t-r27-0-1-/
[url]https://devtalk.nvidia.com/default/topic/1002327/jetson-tx1/hardware-accelerated-video-encoding-with-gstreamer/post/5122103/#5122103[/url]