@amycao I tried clearing the gstreamer cache before but no change. Here’s the output with GST_DEBUG=4 for deepstream-test1 after clearing the gstreamer cache again:
0:00:00.000138449 28069 0x5621ff57a800 INFO GST_INIT gst.c:586:init_pre: Initializing GStreamer Core Library version 1.14.4
0:00:00.000230522 28069 0x5621ff57a800 INFO GST_INIT gst.c:587:init_pre: Using library installed in /usr/lib/x86_64-linux-gnu
0:00:00.000259586 28069 0x5621ff57a800 INFO GST_INIT gst.c:607:init_pre: Linux Chris-PC 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64
0:00:00.000806645 28069 0x5621ff57a800 INFO GST_INIT gstmessage.c:127:_priv_gst_message_initialize: init messages
0:00:00.001911806 28069 0x5621ff57a800 INFO GST_INIT gstcontext.c:84:_priv_gst_context_initialize: init contexts
0:00:00.002371479 28069 0x5621ff57a800 INFO GST_PLUGIN_LOADING gstplugin.c:317:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.002563793 28069 0x5621ff57a800 INFO GST_PLUGIN_LOADING gstplugin.c:225:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.002593454 28069 0x5621ff57a800 INFO GST_PLUGIN_LOADING gstplugin.c:227:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.002647068 28069 0x5621ff57a800 INFO GST_REGISTRY gstregistry.c:1727:ensure_current_registry: reading registry cache: /home/chris/.cache/gstreamer-1.0/registry.x86_64.bin
0:00:00.002850822 28069 0x5621ff57a800 INFO GST_REGISTRY gstregistrybinary.c:539:priv_gst_registry_binary_read_cache: Unable to mmap file /home/chris/.cache/gstreamer-1.0/registry.x86_64.bin : Failed to open file “/home/chris/.cache/gstreamer-1.0/registry.x86_64.bin”: open() failed: No such file or directory
0:00:00.002894996 28069 0x5621ff57a800 INFO GST_REGISTRY gstregistrybinary.c:549:priv_gst_registry_binary_read_cache: Unable to read file /home/chris/.cache/gstreamer-1.0/registry.x86_64.bin : Failed to open file “/home/chris/.cache/gstreamer-1.0/registry.x86_64.bin”: No such file or directory
0:00:00.002915498 28069 0x5621ff57a800 INFO GST_REGISTRY gstregistry.c:1583:scan_and_update_registry: Validating plugins from registry cache: /home/chris/.cache/gstreamer-1.0/registry.x86_64.bin
0:00:00.000157857 28070 0x562138b0d800 INFO GST_INIT gst.c:586:init_pre: Initializing GStreamer Core Library version 1.14.4
0:00:00.000264515 28070 0x562138b0d800 INFO GST_INIT gst.c:587:init_pre: Using library installed in /usr/lib/x86_64-linux-gnu
0:00:00.000304440 28070 0x562138b0d800 INFO GST_INIT gst.c:607:init_pre: Linux Chris-PC 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64
0:00:00.000773150 28070 0x562138b0d800 INFO GST_INIT gstmessage.c:127:_priv_gst_message_initialize: init messages
0:00:00.001906514 28070 0x562138b0d800 INFO GST_INIT gstcontext.c:84:_priv_gst_context_initialize: init contexts
0:00:00.002370497 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:317:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.002588696 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:225:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.002620818 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:227:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.002672670 28070 0x562138b0d800 INFO GST_REGISTRY gstregistry.c:1762:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.002695833 28070 0x562138b0d800 INFO GST_INIT gst.c:807:init_post: GLib runtime version: 2.56.4
0:00:00.002716077 28070 0x562138b0d800 INFO GST_INIT gst.c:809:init_post: GLib headers version: 2.56.4
0:00:00.002732411 28070 0x562138b0d800 INFO GST_INIT gst.c:810:init_post: initialized GStreamer successfully
0:00:00.012655028 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvvideo4linux2.so" loaded
0:00:00.018019446 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_dewarper.so" loaded
0:00:00.024883962 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_osd.so" loaded
0:00:00.025492802 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_msgbroker.so" loaded
0:00:00.057899434 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvvideoconvert.so" loaded
0:00:00.058967089 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_msgconv.so" loaded
0:00:00.059138417 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_ofvisual.so" loaded
0:00:00.059724736 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_tracker.so" loaded
0:00:00.060196165 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_jpegdec.so" loaded
0:00:00.060520495 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_dsexample.so" loaded
0:00:00.060748782 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_multistream.so" loaded
0:00:00.061351780 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_eglglessink.so" loaded
0:00:00.061498261 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_segvisual.so" loaded
0:00:00.061676318 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_of.so" loaded
0:00:00.076552353 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_infer.so" loaded
0:00:00.076897530 28070 0x562138b0d800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_multistreamtiler.so" loaded
0:00:00.095455152 28069 0x5621ff57a800 INFO GST_REGISTRY gstregistry.c:1694:scan_and_update_registry: Registry cache changed. Writing new registry cache
0:00:00.095480987 28069 0x5621ff57a800 INFO GST_REGISTRY gstregistrybinary.c:369:priv_gst_registry_binary_write_cache: Building binary registry cache image
0:00:00.095658553 28069 0x5621ff57a800 INFO GST_REGISTRY gstregistrybinary.c:401:priv_gst_registry_binary_write_cache: Writing binary registry cache
0:00:00.098486158 28069 0x5621ff57a800 INFO GST_REGISTRY gstregistrybinary.c:262:gst_registry_binary_cache_finish: Wrote binary registry cache
0:00:00.098496404 28069 0x5621ff57a800 INFO GST_REGISTRY gstregistry.c:1703:scan_and_update_registry: Registry cache written successfully
0:00:00.098502237 28069 0x5621ff57a800 INFO GST_REGISTRY gstregistry.c:1762:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.098508141 28069 0x5621ff57a800 INFO GST_INIT gst.c:807:init_post: GLib runtime version: 2.56.4
0:00:00.098513496 28069 0x5621ff57a800 INFO GST_INIT gst.c:809:init_post: GLib headers version: 2.56.4
0:00:00.098517439 28069 0x5621ff57a800 INFO GST_INIT gst.c:810:init_post: initialized GStreamer successfully
0:00:00.098562614 28069 0x5621ff57a800 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "pipeline" named "dstest1-pipeline"
0:00:00.098620322 28069 0x5621ff57a800 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "filesrc"!
0:00:00.098625941 28069 0x5621ff57a800 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "h264parse"!
0:00:00.101019387 28069 0x5621ff57a800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvvideo4linux2.so" loaded
0:00:00.101028808 28069 0x5621ff57a800 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "nvv4l2decoder" named "nvv4l2-decoder"
0:00:00.101229478 28069 0x5621ff57a800 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:<GstVideoDecoder@0x5621ff5d81c0> adding pad 'sink'
0:00:00.101241308 28069 0x5621ff57a800 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:<GstVideoDecoder@0x5621ff5d81c0> adding pad 'src'
0:00:00.123463282 28069 0x5621ff57a800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_multistream.so" loaded
0:00:00.123477642 28069 0x5621ff57a800 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "nvstreammux" named "stream-muxer"
0:00:00.123579000 28069 0x5621ff57a800 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:<GstNvStreamMux@0x5621ff666010> adding pad 'src'
0:00:00.137657600 28069 0x5621ff57a800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_infer.so" loaded
0:00:00.137672692 28069 0x5621ff57a800 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "nvinfer" named "primary-nvinference-engine"
0:00:00.137780357 28069 0x5621ff57a800 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:<GstBaseTransform@0x5621ff965370> adding pad 'sink'
0:00:00.137790518 28069 0x5621ff57a800 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:<GstBaseTransform@0x5621ff965370> adding pad 'src'
0:00:00.138013662 28069 0x5621ff57a800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvvideoconvert.so" loaded
0:00:00.138021589 28069 0x5621ff57a800 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "nvvideoconvert" named "nvvideo-converter"
0:00:00.138098719 28069 0x5621ff57a800 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:<GstBaseTransform@0x5621ff97b2e0> adding pad 'sink'
0:00:00.138107182 28069 0x5621ff57a800 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:<GstBaseTransform@0x5621ff97b2e0> adding pad 'src'
0:00:00.139853261 28069 0x5621ff57a800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_osd.so" loaded
0:00:00.139862500 28069 0x5621ff57a800 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "nvdsosd" named "nv-onscreendisplay"
0:00:00.139935451 28069 0x5621ff57a800 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:<GstBaseTransform@0x5621ff9960d0> adding pad 'sink'
0:00:00.139947390 28069 0x5621ff57a800 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:<GstBaseTransform@0x5621ff9960d0> adding pad 'src'
0:00:00.140500228 28069 0x5621ff57a800 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_eglglessink.so" loaded
0:00:00.140509202 28069 0x5621ff57a800 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "nveglglessink" named "nvvideo-renderer"
0:00:00.140617944 28069 0x5621ff57a800 INFO GST_ELEMENT_PADS gstelement.c:670:gst_element_add_pad:<GstBaseSink@0x5621ff9ef9f0> adding pad 'sink'
source element could not be created. Exiting.
@ChrisDing yes, I changed the code to show the result of each gst element. Originally it was just a single IF statement that checked all of them and the output was “One element could not be created”. This way I can see which element is causing the issue. It’s more verbose but it’s a bit more precise.
if (!source) {
g_printerr ("source element could not be created. Exiting.\n");
return -1;
}
if (!h264parser) {
g_printerr ("h264parser element could not be created. Exiting.\n");
return -1;
}
if (!decoder) {
g_printerr ("decoder element could not be created. Exiting.\n");
return -1;
}
if (!pgie) {
g_printerr ("pgie element could not be created. Exiting.\n");
return -1;
}
if (!nvvidconv) {
g_printerr ("nvvidconv element could not be created. Exiting.\n");
return -1;
}
if (!nvosd) {
g_printerr ("nvosd element could not be created. Exiting.\n");
return -1;
}
if (!sink) {
g_printerr ("sink element could not be created. Exiting.\n");
return -1;
}
Here is the output for “gst-inspect-1.0 nvv4l2decoder”:
(gst-plugin-scanner:26765): GStreamer-WARNING **: 12:55:07.430: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_osd.so': /home/chris/anaconda3/libexec/gstreamer-1.0/../../lib/libpangoft2-1.0.so.0: undefined symbol: pango_font_description_set_variations
Factory Details:
Rank primary + 11 (267)
Long-name NVIDIA v4l2 video decoder
Klass Codec/Decoder/Video
Description Decode video streams via V4L2 API
Author Nicolas Dufresne <nicolas.dufresne@collabora.com>, Viranjan Pagar <vpagar@nvidia.com>
Plugin Details:
Name nvvideo4linux2
Description Nvidia elements for Video 4 Linux
Filename /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvvideo4linux2.so
Version 1.14.0
License LGPL
Source module nvvideo4linux2
Binary package nvvideo4linux2
Origin URL http://nvidia.com/
GObject
+----GInitiallyUnowned
+----GstObject
+----GstElement
+----GstVideoDecoder
+----GstNvV4l2VideoDec
+----nvv4l2decoder
Pad Templates:
SRC template: 'src'
Availability: Always
Capabilities:
video/x-raw(memory:NVMM)
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
SINK template: 'sink'
Availability: Always
Capabilities:
image/jpeg
video/x-h264
stream-format: { (string)byte-stream }
alignment: { (string)au }
video/x-h265
stream-format: { (string)byte-stream }
alignment: { (string)au }
video/mpeg
mpegversion: 4
systemstream: false
parsed: true
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
video/mpeg
mpegversion: [ 1, 2 ]
systemstream: false
parsed: true
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
video/x-divx
divxversion: [ 4, 5 ]
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
video/x-vp8
video/x-vp9
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
Element has no clocking capabilities.
Element has no URI handling capabilities.
Pads:
SINK: 'sink'
Pad Template: 'sink'
SRC: 'src'
Pad Template: 'src'
Element Properties:
name : The name of the object
flags: readable, writable
String. Default: "nvv4l2decoder0"
parent : The parent of the object
flags: readable, writable
Object of type "GstObject"
device : Device location
flags: readable
String. Default: "/dev/nvhost-nvdec"
device-name : Name of the device
flags: readable
String. Default: ""
device-fd : File descriptor of the device
flags: readable
Integer. Range: -1 - 2147483647 Default: -1
output-io-mode : Output side I/O mode (matches sink pad)
flags: readable, writable
Enum "GstNvV4l2IOMode" Default: 0, "auto"
(0): auto - GST_V4L2_IO_AUTO
(2): mmap - GST_V4L2_IO_MMAP
(5): dmabuf-import - GST_V4L2_IO_DMABUF_IMPORT
capture-io-mode : Capture I/O mode (matches src pad)
flags: readable, writable
Enum "GstNvV4l2IOMode" Default: 0, "auto"
(0): auto - GST_V4L2_IO_AUTO
(2): mmap - GST_V4L2_IO_MMAP
(5): dmabuf-import - GST_V4L2_IO_DMABUF_IMPORT
extra-controls : Extra v4l2 controls (CIDs) for the device
flags: readable, writable
Boxed pointer of type "GstStructure"
skip-frames : Type of frames to skip during decoding
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "SkipFrame" Default: 0, "decode_all"
(0): decode_all - Decode all frames
(1): decode_non_ref - Decode non-ref frames
(2): decode_key - decode key frames
drop-frame-interval : Interval to drop the frames,ex: value of 5 means every 5th frame will be given by decoder, rest all dropped
flags: readable, writable, changeable only in NULL or READY state
Unsigned Integer. Range: 1 - 30 Default: 0
num-extra-surfaces : Additional number of surfaces in addition to min decode surfaces given by the v4l2 driver
flags: readable, writable, changeable only in NULL or READY state
Unsigned Integer. Range: 1 - 24 Default: 0
cudadec-memtype : Set to specify memory type for cuda decoder buffers
flags: readable, writable, changeable only in NULL or READY state
Enum "CudaDecMemType" Default: 2, "memtype_unified"
(0): memtype_device - Memory type Device
(1): memtype_pinned - Memory type Host Pinned
(2): memtype_unified - Memory type Unified
gpu-id : Set to GPU Device ID for decoder
flags: readable, writable, changeable only in NULL or READY state
Unsigned Integer. Range: 0 - 4294967295 Default: 0