How can I receive stream video content over a network with UDP protocol?
조회 수: 28 (최근 30일)
이전 댓글 표시
How can I receive stream video content over a network with UDP protocol?
I'm using Matlab 2015b, and I want to receive stream video from a Ar Drone Parrot. I have used MMS protocol to try receive stream video without success. I get an error because the format used by Ar Drone is MPEG-4 with H.264 encoded video and this protocol use the function "DSPWinMMFileInfo" which throws error.
So, I want to receive this stream video with UDP protocol, but I don't know how. I have seen examples to transmit audio data over a network with UDP, but not for video.
Please, can anybody help me? Thanks
댓글 수: 2
Rakesh Chavan
2016년 3월 16일
Hi,
Can you post a snapshot of the error message you receive along with the code snippet that you are using.
The doc. link given below gives an example of sending video over network. Have you used something similar?
regards
Rakesh
채택된 답변
Florian Enner
2016년 5월 14일
편집: Florian Enner
2016년 5월 14일
I've uploaded a submission that supports streaming h264 (among other formats) from ip cameras.
% Connect to stream
cam = HebiCam('<address>');
% Continously display latest image
figure();
fig = imshow(getsnapshot(cam));
while true
set(fig, 'CData', getsnapshot(cam));
drawnow;
end
Let me know if this works for you.
댓글 수: 1
추가 답변 (3개)
Dinesh Iyer
2016년 3월 17일
The system object does allow you to read video content over MMS stream. However, the issue might be that it is unable to decode the H.264 stream that is contained in the video.
When you are using UDP, I noticed that the error indicates a permissions issue to access the socket. The system object error also indicates that it is unable to add the source for reading. This might be a permissions issue.
One quick thing to try is see if you are able to view this stream using Windows Media Player as the system object uses some of the same APIs to read it. Open Media Player, File > Open URL and try to stream data from your URL. If Media Player fails, then the system object is expected to fail.
Hope this helps.
Dinesh
댓글 수: 2
David
2017년 1월 27일
Hello María VIctoria, I have exactly the same problem...how did you fix the issue on madia player codec?
Thanks in advance for your help,
David
maha annoukoubi
2016년 4월 29일
hello Maria i m working at the same project , please could you contact me on : m.annoukoubi@gmail.com so that we may share our informations .
Mohamed Abdelkader Zahana
2016년 5월 12일
Hi Maria,
I am trying to do almost the same thing. The difference is that I will have an embedded computer (ODROID XU4) with connected camera that streams video over UDP using gstreamer. Then, I would like to receive the video in MATLAB. I'd appreciate if any one can help.
Here is my email in case you find a solution.
Thanks.
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Support Package for USB Webcams에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!