Why I can not connect to IP camera with ipcam

16 ビュー (過去 30 日間)
Daniel Ponce
Daniel Ponce 2022 年 12 月 1 日
I can connect to my IP camera (Sony SRG 300SE) through VLC media player just with the URL: rtsp://192.168.100.8/video2 but not with Matlab ipcam object.
I tried:
>> cam=ipcam('rtsp://192.168.100.8/video2')
Error: Cannot connect to the IP Camera Stream URL. Make sure the URL is correct and authentication is provided
if needed.
>> cam=ipcam('rtsp://192.168.100.8/video2.mjpeg')
Error: Unable to connect to the IP Camera Stream URL due to incorrect Username or Password.
>> cam=ipcam('rtsp://192.168.100.8/video2.mjpeg','admin','admin')
Error: Unable to connect to the IP Camera Stream URL due to incorrect Username or Password.
There are some curious aspects:
-VLC does not ask for password
-URL for VLC works without the extension ".mjpeg" and does not work with it
- Matlab asks for password when i add the extension but the password does not work
Does any body know what could be happening here?

採用された回答

Harshit Gupta
Harshit Gupta 2022 年 12 月 21 日
I understand that you are getting the following error when you are trying to connect to an IP camera with the "ipcam" function:
"Unable to connect to the IP Camera Stream URL due to incorrect Username or Password."
This is a known issue in MATLAB R2022b. Please refer to the bug report linked below:
To resolve this issue, please try the following:
  • Set the IP camera authentication setting as "Digest/Basic" or "Basic".
When set to "Digest/Basic", MATLAB will try connecting using digest authentication first. Some IP cameras like those manufactured by CP Plus are still able to use digest authentication. In case digest authentication doesn't work, the support package will try connecting using basic authentication as directed by the Support Package. So, if the authentication of the camera has been set as "digest/basic" or "basic" this would ensure that at least the basic authentication goes through, without throwing an error.

その他の回答 (1 件)

MathWorks MATLAB Hardware Team
MathWorks MATLAB Hardware Team 2023 年 3 月 8 日
As mentioned in the above answer, this connection issue was a known bug. It is now fixed in the latest MATLAB update. Update your MATLAB and IP camera support package to the latest versions to get the fix.

カテゴリ

Help Center および File ExchangeMATLAB Support Package for IP Cameras についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by