Playing/processing video stream

1 view (last 30 days)
Olle Axelsson
Olle Axelsson on 7 Jul 2015
Answered: Florian Enner on 14 May 2016
Hi!
I'm using mplayer to receive and play a h264 video stream on my windows 7 computer. My question is how to get this video stream into matlab/simulink (R2013b) for video processing? I'm using the following command to receive and play the stream in mplayer:
mplayer.exe -fps 200 -demuxer h264es ffmpeg://tcp://10.71.99.212:2278*
Thanks in advance
Regards Olle

Answers (2)

Dinesh Iyer
Dinesh Iyer on 7 Jul 2015
Hi Olle,
It is currently not possible to read a H.264 stream into MATLAB. However, it is possible to read MMS streams using the From Multimedia File Block or the vision.VideoFileReader system object. Here is the link to the documentation that might help: From Multimedia File Block
Hope this helps.
Dinesh

Florian Enner
Florian Enner on 14 May 2016
I've uploaded a submission that supports streaming h264 (among other formats) from ip cameras. It supports R2013b and does not require any toolboxes. It currently only supports MATLAB code, not Simulink.
% Connect to stream
cam = HebiCam('<address>');
% Continously display latest image
figure();
fig = imshow(getsnapshot(cam));
while true
set(fig, 'CData', getsnapshot(cam));
drawnow;
end
You can get it from FileExchange or Github

Categories

Find more on MATLAB Support Package for IP Cameras in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!