@DaneLLL , removing the -Y
from the ssh
command made the two pipelines work.
Also, the pipeline to fakesink
worked; I remember that basic test used to fail.
This brings hope to our team. Thank you very much, 😃.
Do you know why X11 forwarding through the tunnel interferes with the nvarguscamerasrc
?
This was the only way to test streaming on other cameras that use v4l2src
and regular UYVY
colour format in a headless Jetson unit.
With that out of the way, the UDP pipeline is extremely slow, as shown in the video attached. This video is produced at 10 fps, however, it is updated at more than 30 seconds per frame!
Please note the errors from the nvargus-daemon:
Apr 16 12:31:14 orin-4 nvargus-daemon[218012]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 453)
Apr 16 12:31:14 orin-4 nvargus-daemon[218012]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 347)
Apr 16 12:31:14 orin-4 nvargus-daemon[218012]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function getSource(), line 519)
Apr 16 12:31:14 orin-4 nvargus-daemon[218012]: E/ libnvphs:socket: Error[2]: socket connection /var/lib/nvphs/nvphsd.ctl to PHS failed: No such file or directory
Apr 16 12:31:14 orin-4 nvargus-daemon[218012]: D/ libnvphs:socket: Warning: connecting to Power Hinting Service failed. Is PHS running?
Apr 16 12:31:14 orin-4 nvargus-daemon[218012]: === gst-launch-1.0[218037]: CameraProvider initialized (0xffff88792010)SCF: Error BadValue: NvPHSSendThroughputHints (in src/common/CameraPowerHint.cpp, function sendCameraPowerHint(), line 56)
Apr 16 12:31:14 orin-4 nvargus-daemon[218012]: E/ libnvphs:socket: Error[2]: socket connection /var/lib/nvphs/nvphsd.ctl to PHS failed: No such file or directory
Apr 16 12:31:14 orin-4 nvargus-daemon[218012]: D/ libnvphs:socket: Warning: connecting to Power Hinting Service failed. Is PHS running?
Apr 16 12:31:14 orin-4 nvargus-daemon[218012]: E/ libnvphs: Error: NvPHSSendThroughputHints[usecase=camera, hint=MinCPU, value=4294967295, timeout_ms=1000]: queue_or_send() failed
I noticed that there are two mentions of Error BadValue: NvPHSSendThroughputHints
: one when the Camera provider is initialized, === gst-launch-1.0[218037]: CameraProvider initialized (0xffff88792010)SCF:
, and a second one where the nvargus-daemon is trying to use the libnvphs: orin-4 nvargus-daemon[218012]: E/ libnvphs:
and there are mentions of a socket for the Power Hinting Service (PHS), not found in /var/lib/nvphs/nvphsd.ctl
. I checked in orin-4, the path exists, but it is empty, the socket file indeed is not found there.
Is this PHS still in use in Orin NX (16GB) with the JetPack 5.1.2?
Below is a verification on the same machine with the same ssh connection as above that I am producing the video at 10 FPS to a fakesink (no video to show):
gst-launch-1.0 nvarguscamerasrc sensor-id=0 sensor-mode=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=10/1, format=NV12' ! nvvidconv ! fpsdisplaysink text-overlay=0 name=sink_0 video-sink=fakesink sync=0 -v
...
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
/GstPipeline:pipeline0/GstFPSDisplaySink:sink_0/GstFakeSink:fakesink0: sync = false
/GstPipeline:pipeline0/GstFPSDisplaySink:sink_0: last-message = rendered: 7, dropped: 0, current: 11.86, average: 11.86
/GstPipeline:pipeline0/GstFPSDisplaySink:sink_0: last-message = rendered: 12, dropped: 0, current: 9.97, average: 10.99
/GstPipeline:pipeline0/GstFPSDisplaySink:sink_0: last-message = rendered: 18, dropped: 0, current: 10.00, average: 10.64
/GstPipeline:pipeline0/GstFPSDisplaySink:sink_0: last-message = rendered: 24, dropped: 0, current: 10.02, average: 10.48
/GstPipeline:pipeline0/GstFPSDisplaySink:sink_0: last-message = rendered: 29, dropped: 0, current: 9.98, average: 10.39
/GstPipeline:pipeline0/GstFPSDisplaySink:sink_0: last-message = rendered: 34, dropped: 0, current: 10.00, average: 10.33
When I tested our software in that orin-4 unit, it still fails.
Below is a sample of the C++ and GStreamer pipeline (many details omitted due to the size of the code):
std::stringstream aS;
aS << " nvarguscamerasrc sensor-id=" << address << " sensor-mode=0 "
<< "! video/x-raw(memory:NVMM), width=" << frame_width << ", height=" << frame_height << ", format=(string)NV12, framerate=(fraction)10/1 "
<< "! queue "
<< "! nvvidconv flip-method=" << flip_method << " "
<< "! video/x-raw, format=(string)BGRx "
<< "! videoconvert "
<< "! video/x-raw, format=(string)BGR, width=" << frame_width << ", height=" << frame_height << " "
<< "! appsink drop=True";
This produces the following pipeline (copied from the application logs):
nvarguscamerasrc sensor-id=0 sensor-mode=0 ! video/x-raw(memory:NVMM), width=1280, height=720, format=(string)NV12, framerate=(fraction)10/1 ! queue ! nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR, width=1280, height=720 ! appsink drop=True
The C++ code then passes this stream to the Opencv stream object and starts processing it:
cv::VideoCapture aStream; // from opencv 4.2
bool retVal = aStream.open(aSs.str().c_str(), cv::CAP_GSTREAMER); // use the video I/O backend gstreamer
We can’t test video output directly in orin-4 using a sink plugin that requires an X11 server due to the combination of these two items:
- We are in headless mode; there is no X11 server.
- Now the SSH connection is done without X11 forwarding (no
-Y
)
How do you suggest I test that the pipeline is producing video?
The C++ application shows errors, and there are no video frames processed in the application either.
Do you see anything meaningful in these error messages from our application log and from the nvargus-daemon?
15|SmrtHVRService | 2025-04-16 14:44:20.111 [deb] cvcam.cpp 116 CVCam::ConnectDevice() GStreamer pipeline: nvarguscamerasrc sensor-id=0 sensor-mode=0 ! video/x-raw(memory:NVMM), width=1280, height=720, format=(string)NV12, framerate=(fraction)10/1 ! queue ! nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR, width=1280, height=720 ! appsink drop=True
15|SmrtHVRService | 0:00:28.769089967 285943 0xfffe300079e0 FIXME default gstutils.c:3980:gst_pad_create_stream_id_internal:<nvarguscamerasrc6:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
15|SmrtHVRService | (Argus) Error BadParameter: (propagating from src/eglstream/FrameConsumerImpl.cpp, function initialize(), line 89)
15|SmrtHVRService | (Argus) Error BadParameter: (propagating from src/eglstream/FrameConsumerImpl.cpp, function create(), line 44)
15|SmrtHVRService | Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadInitialize:320 Failed to create FrameConsumer
15|SmrtHVRService | Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:241 (propagating)
15|SmrtHVRService | Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:804 (propagating)
15|SmrtHVRService | GST_ARGUS: Creating output stream
15|SmrtHVRService | GST_ARGUS: Creating output stream
15|SmrtHVRService | GST_ARGUS: Creating output stream
Thank you very much for your help!