MATLAB Answers

does it is possible to live stream video in matlab with H.264 codec

33 ビュー (過去 30 日間)
Haris Elahi
Haris Elahi 2018 年 3 月 26 日
コメント済み: Lorenzo Giannini 2020 年 12 月 9 日
I have hikvision camera that has video encoding in H.264 I m wondering that if I could live stream that video in Matlab. Or it is possible to do with vlc video player.

  0 件のコメント

サインインしてコメントする。

回答 (3 件)

MathWorks MATLAB Hardware Team
MathWorks MATLAB Hardware Team 2020 年 8 月 27 日
Hi Haris,
MATLAB will be supporting H.264 encoded RTSP streams for IP Cameras through MATLAB Support Package for IPCameras in the upcoming release, MATLAB R2020b version. Hope it helps!

  3 件のコメント

tal mazor
tal mazor 2020 年 9 月 22 日
I have purchased the R2019b some time ago. I have been trying, during many months, to stream the RTSP H.264 from two of my cameras. How can I stream my cameras with the R2019b ?
Walter Roberson
Walter Roberson 2020 年 9 月 22 日
tal mazor:
You cannot do that. R2020b is the first release that supports rtsp H.264 . Releases before that only support RTSP for Motion MPEG at most.

サインインしてコメントする。


Walter Roberson
Walter Roberson 2018 年 3 月 26 日
Historically it has not been possible to live stream h264, but I have not rechecked the latest two releases. I cannot presently rule out the possibility that a recent change to support for one of the boards such as arduino might perhaps have added the capability; it was not there in R2017a (not without running a custom adapter)
Devices such as gigabit cameras return entire frames in the mode supported by MATLAB, rather retuning h264 streams with some hypothetical function to decode the frames.
The historical support for h264 has only been from file, not streaming.
If you have Windows then you can use activexserver to talk to a COM object to do the decoding for you and to return the frames.

  5 件のコメント

表示 2 件の古いコメント
Walter Roberson
Walter Roberson 2018 年 3 月 26 日
Ipcam does not handle h264 streaming. Instead, it talks to a web server on the device and asks the device to send it one decoded frame. This requires that you have the right ip address and right port and any authentication information. The device you mention probably does support the feature but it might need to be configured to do so.
If the device is being connected to wirelessly then you have the question of whether it is within wifi range that you can use a private network to reach it, or if instead it is connected through cell phone service such as LTE, in which case you probably need to know the public ip address assigned by the cell provider (which is likely to change.)
I recommend reading the documentation on activexserver as it has examples.
Haris Elahi
Haris Elahi 2018 年 3 月 26 日
Sir actually my camera is connected via ethernet cable. i use this cmd
cam = ipcam('rtsp://192.168.1.7:554/doc/page/preview.asp','admin','pass');
Walter Roberson
Walter Roberson 2018 年 3 月 26 日
With rtsp the device needs to be configured for Motion MPEG, not for H264

サインインしてコメントする。


Astarag Chattopadhyay
Astarag Chattopadhyay 2020 年 9 月 22 日
The support for H.264 encoded RTSP streams in MATLAB Support Package for IPCameras is now available with MATLAB version R2020b.

  5 件のコメント

表示 2 件の古いコメント
tal mazor
tal mazor 2020 年 12 月 5 日
I upgraded to R2020b. Still not able to obtain an Image!
)-:
Astarag Chattopadhyay
Astarag Chattopadhyay 2020 年 12 月 7 日
Hi Tal,
You can use the following documentation to troubleshoot the connection issue:
Ensure that the authorization is set to basic and not digest in the camera software settings. For further help please reach out to MathWorks Technical Support.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by