Hello GStreamer friends,
I’ve come across a weird issue using the NVIDIA nvh264enc element with my pipeline. It’s a testing sources for a project I’m building.
Below works:-
gst-launch-1.0 videotestsrc is-live=true pattern=ball ! video/x-raw,format=I420,width=1920,height=1080,framerate=25/1 ! videoconvert ! x264enc bitrate=5000 key-int-max=25 tune=zerolatency ! h264parse ! mpegtsmux name=mux alignment=7 ! queue ! udpsink host=127.0.0.1 port=1234 audiotestsrc is-live=true freq=800 ! audio/x-raw,rate=48000,channels=2 ! voaacenc bitrate=128000 ! aacparse ! queue ! mux.
Works for windows however on Linux once then fails:-
gst-launch-1.0 videotestsrc is-live=true pattern=ball ! video/x-raw,format=I420,width=1920,height=1080,framerate=25/1 ! videoconvert ! nvh264enc bitrate=5000 max-bitrate=5000 rc-mode=cbr gop-size=25 ! video/x-h264,profile=high ! h264parse ! mpegtsmux name=mux alignment=7 ! queue ! udpsink host=127.0.0.1 port=1234 audiotestsrc is-live=true freq=800 ! audio/x-raw,rate=48000,channels=2 ! voaacenc bitrate=128000 ! aacparse ! queue ! mux.
Why is there no consistency between Windows and Linux with below:-
video/x-h264,profile=high,level=4.1
I’m working to provide a DVB compliant h264 source for a DVB-T transmission.
I’m using a NVIDIA Tesla P4 with the recommended 470 headless driver on a Ubuntu 24.04 LTS Ubuntu shipping with 1.24.2 gstreamer build. My dev machine has a ninbuilt i915 intel GPU and I’ve managed to successfully configured X11 to use i915 for raster, and configured the NVIDIA Tesla P4 for offline h264 decode and encode operations.
Has been a step learning curve to even get here trying to get Tesla P4 driver installed and co-existing with the i915 Intel GPU. (Like a Cat and Dog eating out the same food bowl!)
I installed all the dependencies including the latest CUDA SDK to build nvcodec from the bad plugin base to have successfully working nvh264enc and nvh264dec elements.
I have a working pipeline running on my windows machine which has an inbuilt RTX3050 GPU working and preforms a treat however, on the Linux machine the same pipeline fails to run…
Seems the h264 caps profile=high, level4.1 aren’t usable in Linux?
Not sure why?
I’ve since removed the level parameter and the pipeline seems to work however, after closing and restarting my pipeline, the nvh264enc element is not recognised?
When replacing with nvh264enc with x264enc the pipeline runs without the profile and level parameters.
When running the second time the pipeline fails not understanding the bitrate parameter?
Using gst-inspect-1.0 nvh264enc shows the plugin is not registered pulling errors with GLib which I can’t explain. 10 minutes before, everything was ship shape? Error below-
(gst-launch-1.0:47731): GStreamer-CRITICAL **: 01:07:21.522: gst_element_factory_get_element_type: assertion 'GST_IS_ELEMENT_FACTORY (factory)' failed
(gst-launch-1.0:47731): GLib-GObject-CRITICAL **: 01:07:21.522: cannot retrieve class for invalid (unclassed) type '<invalid>'
(gst-launch-1.0:47731): GStreamer-CRITICAL **: 01:07:21.522: gst_element_factory_get_element_type: assertion 'GST_IS_ELEMENT_FACTORY (factory)' failed
(gst-launch-1.0:47731): GStreamer-CRITICAL **: 01:07:21.522: gst_element_factory_get_element_type: assertion 'GST_IS_ELEMENT_FACTORY (factory)' failed
(gst-launch-1.0:47731): GLib-GObject-CRITICAL **: 01:07:21.522: g_object_class_find_property: assertion 'G_IS_OBJECT_CLASS (class)' failed
(gst-launch-1.0:47731): GStreamer-CRITICAL **: 01:07:21.522: gst_object_unref: assertion 'object != NULL' failed
(gst-launch-1.0:47731): GLib-GObject-CRITICAL **: 01:07:21.522: g_type_class_unref: assertion 'g_class != NULL' failed
(gst-launch-1.0:47731): GStreamer-CRITICAL **: 01:07:21.524: gst_element_link_pads_filtered: assertion 'GST_IS_BIN (parent)' failed
WARNING: erroneous pipeline: no property "bitrate" in element "nvh264enc"
dev@dev:~/repeater/mux$ gst-inspect-1.0 nvh264enc
element plugin couldn't be loaded
No such element or plugin 'nvh264enc'
How can this be and has anyone else run into this issue. After a reboot the pipeline works the first time then second time same issue?
Anyone had any issue in the same manner with nvh264enc?
Any recommendations on what to check, do, destroy, rebuild welcome?
I’m in bit of a pickle and not sure what to do.