[rtsp @ 0x55b45e3820] method DESCRIBE failed: 401 Unauthorized

Posted 振华OPPO

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[rtsp @ 0x55b45e3820] method DESCRIBE failed: 401 Unauthorized相关的知识,希望对你有一定的参考价值。

YOLOv5 🚀  torch 1.9.0 CPU
Fusing layers... 
Model Summary: 232 layers, 7459581 parameters, 0 gradients
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "/home/firefly/anaconda3/envs/yolo/lib/python3.8/site-packages/cv2/qt/plugins"
[rtsp @ 0x55b45e3820] method DESCRIBE failed: 401 Unauthorized
[ERROR:0@4.524] global /io/opencv/modules/videoio/src/cap.cpp (164) open VIDEOIO(CV_IMAGES): raised OpenCV exception:
OpenCV(4.6.0) /io/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://admin:admin@192.168.144.64:554/h265/ch1/main/av_stream in function 'icvExtractPattern'
1/1: rtsp://admin:admin@192.168.144.64:554/h265/ch1/main/av_stream... Traceback (most recent call last):
  File "detect.py", line 258, in <module>
    detect()
  File "detect.py", line 130, in detect
    dataset = LoadStreams(source, img_size=imgsz, stride=stride)
  File "/home/firefly/yolov5-rknn/utils/datasets.py", line 279, in __init__
    assert cap.isOpened(), f'Failed to open s'
AssertionError: Failed to open rtsp://admin:admin@192.168.144.64:554/h265/ch1/main/av_stream

yolov5 检测rtsp视频流,运行报错:


排查问题:

  • 相机是否能在网页访问,能访问说明rtsp流可以拉
  • rtsp地址格式没有问题,海康标准格式:rtsp://用户名:密码@ip地址:554/h265/ch1/main/av_stream

然后我发现这个海康相机是有密码的,不是空,然后加上密码后运行成功。

以上是关于[rtsp @ 0x55b45e3820] method DESCRIBE failed: 401 Unauthorized的主要内容,如果未能解决你的问题,请参考以下文章

METS介绍

json Resposta i3met

r 测试STILT的met文件识别功能

.MET Core RSA加密解密

JavaCV开发详解之rtsp推流实战:rtsp转推到rtsp

Onvif获取rtsp地址流程