Closed SergeyMalashenko closed 1 year ago
Hi @SergeyMalashenko , it appears you are building this on x86_64, so the jetson-utils video decoding won't work there (as those hardware-accelerated gstreamer elements are for Jetson only)
You can try changing the GStreamer element here:
You would want to change it from omxh264dec
to a h264 decoding plugin for GStreamer that you have on x86 (see here)
Hardware: Jetson Nano 4GB
video-viewer --input-codec=h265 rtsp://admin:rgbsi123@192.168.1.61:554/Streaming/channels/101 [gstreamer] initialized gstreamer, version 1.14.5.0 [gstreamer] gstDecoder -- creating decoder for @192.168.1.61 Opening in BLOCKING MODE Opening in BLOCKING MODE NvMMLiteOpen : Block : BlockType = 279 NVMEDIA: Reading vendor.tegra.display-size : status: 6 NvMMLiteBlockCreate : Block : BlockType = 279 [gstreamer] gstDecoder -- discovered video resolution: 1280x720 (framerate 0.000000 Hz) [gstreamer] gstDecoder -- discovered video caps: video/x-h265, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1280, height=(int)720, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)main, tier=(string)main, level=(string)3.1 [gstreamer] gstDecoder -- pipeline string: [gstreamer] rtspsrc location=rtsp://@192.168.1.61:554/Streaming/channels/101 latency=2000 ! queue ! rtph265depay ! h265parse ! omxh265dec ! video/x-raw ! appsink name=mysink [gstreamer] gstDecoder -- failed to create pipeline [gstreamer] (no element "omxh265dec") [gstreamer] gstDecoder -- failed to create decoder for rtsp://@192.168.1.61:554/Streaming/channels/101 video-viewer: failed to create input stream
omxh264dec and omxh265dec not found on jetson nano
Can you run gst-inspect-1.0 | grep omx
? Are there any listed?
These should be automatically installed when you use the Nano SD card image.
gst-inspect-1.0 | grep omx libav: avenc_h264_omx: libav OpenMAX IL H.264 video encoder encoder
I downloaded the image from this link: https://developer.nvidia.com/jetson-nano-sd-card-image
This is the expected output:
gst-inspect-1.0 | grep omx
libav: avenc_h264_omx: libav OpenMAX IL H.264 video encoder encoder
omx: omxmpeg4videodec: OpenMAX MPEG4 Video Decoder
omx: omxh264dec: OpenMAX H.264 Video Decoder
omx: omxh265dec: OpenMAX H.265 Video Decoder
omx: omxvp8dec: OpenMAX VP8 Video Decoder
omx: omxvp9dec: OpenMAX VP9 Video Decoder
omx: omxmpeg2videodec: OpenMAX MPEG2 Video Decoder
omx: omxwmvdec: OpenMAX WMV Video Decoder
omx: omxh264enc: OpenMAX H.264 Video Encoder
omx: omxh265enc: OpenMAX H.265 Video Encoder
omx: omxvp8enc: OpenMAX VP8 Video Encoder
omx: omxvp9enc: OpenMAX VP9 Video Encoder
omx: nvoverlaysink: OpenMax Video Sink
You may want to try re-flashing your SD card and confirm what this outputs with a fresh image.
Since I could'nt get my hands on a Jetson Nano Developer Kit(sold out everywhere), I tried to get things running under Ubuntu.
I stumbled upon a similar issue, while trying to get jetson-inference to work under Ubuntu 18.04 x86_64 with a GTX1660S where omxh264dec
is not available.
After installing vaapi for gstreamer and editing the include file gstUtility.h
under build/...
accordingly:
--- /usr/local/include/jetson-utils/gstUtility.h 2022-04-26 14:00:46.400992467 +0200
+++ /speedy/build-env/jetson-inference/build/x86_64/include/jetson-utils/gstUtility.h 2022-04-26 13:16:05.455809154 +0200
@@ -116,7 +116,7 @@
#if GST_CHECK_VERSION(1,0,0)
// Decoders for JetPack <= 4 and GStreamer >= 1.0
-#define GST_DECODER_H264 "omxh264dec"
+#define GST_DECODER_H264 "vaapih264dec"
#define GST_DECODER_H265 "omxh265dec"
#define GST_DECODER_VP8 "omxvp8dec"
#define GST_DECODER_VP9 "omxvp9dec"
the video from the rtsp source got displayed.
Red areas are shifted vertically in some parts of the image. But for testing this is not an issue.
Thanks to this->issue, I was able to get the inital setup running :-)
Good day! I am trying to build and use your project. I am getting the following message.
[gstreamer] gstDecoder -- failed to create pipeline [gstreamer] (no element "omxh264dec") [gstreamer] gstDecoder -- failed to create decoder for file:///home/smalashenko/My_projects/C++/jetson-inference/build/x86_64/bin/./e36-test-29294ba2ae_1602173004_587.mp4 detectnet: failed to create input stream