I am currently using a Jetson Orin NX with Jetpack 5.1.2 and facing an issue while using v4l2loopback to create a virtual video device (video3
), which is then used for RTSP streaming.
Issue Description:
When an RTSP connection is first established to my device, it works fine. However, if I attempt to reconnect, my application crashes with the following logs:
stream ready at rtsp://127.0.0.1:8554/payload
RTSP[run] (): rtsp running
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 4
===== NvVideo: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
H264: Profile = 66, Level = 0
NVMEDIA: Need to set EMC bandwidth : 846000
Opening in BLOCKING MODE
Failed to open /dev/video1: No such file or directory
Opening in BLOCKING MODE
/usr/bin/payload/app-rtsp/run_rtsp_app.sh: line 47: 14017 Segmentation fault sudo ./rtsp_app
The issue is resolved when I stop the nvargus-daemon service using:
sudo systemctl stop nvargus-daemon.service
However, stopping this service causes image corruption in certain cases. If I do not stop nvargus-daemon
, I receive the following logs:
minhvo@ubuntu:~$ sudo /usr/sbin/nvargus-daemon
=== NVIDIA Libargus Camera Service (0.99.33)=== Listening for connections...=== rtsp_app[14018]: Connection established (FFFF814BC900)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
---- imager: No override file found. ----
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent: (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 111)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 0. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 726)
SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 453)
Request for Assistance:
- How can I resolve this issue without stopping
nvargus-daemon
? - If stopping
nvargus-daemon
is the only solution, what are the potential side effects on my system? - Is there an alternative approach to avoid segmentation faults while keeping
nvargus-daemon
running?