I'm trying to publish an RTSP Stream from a Jetson AGX Board using Intel RealSense Cameras and receive the stream on a remote device using Yolov5 (on the same VLAN).

enter image description here

RTSP server is running on the jetson board Simple RTSP (IP Address:10.160.51.19):

docker run --rm -it -e RTSP_PROTOCOLS=tcp -p 8554:8554 -p 1935:1935 -p 8888:8888 aler9/rtsp-simple-server

For publishing the Intel RealSense Camera stream on the RTSP Server, I used ffmpeg:

ffmpeg -pix_fmt uyvy422 -i /dev/video6 -video_size 640x320 -f rtsp -framerate 90 rtsp://localhost:8554/mystream

For receiving the stream on the remote computer using yolov5 (on the same VLAN), I used to following:

git clone https://github.com/ultralytics/yolov5.git

cd yolov5

pip install -r requirements.txt

python detect.py --source rtsp://10.160.51.19:8554/mystream

I got the following error in yolov5:

YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients [ERROR:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap.cpp (166) cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised OpenCV exception: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://10.160.51.19:8554/mystream in function 'cv::icvExtractPattern' Traceback (most recent call last): File "C:\Users\5G\yolov5\detect.py", line 252, in main(opt) File "C:\Users\5G\yolov5\detect.py", line 247, in main run(**vars(opt)) File "C:\Users\Local\Programs\Python\Python310\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "C:\Users\5G\yolov5\detect.py", line 100, in run dataset = LoadStreams(source, img_size=imgsz, stride=stride, auto=pt) File "C:\Users\5G\yolov5\utils\datasets.py", line 328, in init assert cap.isOpened(), f'{st}Failed to open {s}' AssertionError: 1/1: rtsp://10.160.51.19:8554/mystream... Failed to open rtsp://10.160.51.19:8554/mystream

IMPORTANT NOTE:

Please note that when I publish the RTSP stream on other Linux machines (POP!_OS), the error doesn't occur and I'm able to receive the stream in Yolov5.

enter image description here

The above photo shows the stream can be viewed using Yolov5 locally(Linux) and remote (windows terminal) when the stream is published from Pop!_OS. Even though both operating systems run on Debian Ubuntu, I'm getting the error in the Jetson AGX running Tegra, not Pop!_OS.

Thank you

0

There are 0 answers