mms stream error on code.how to make it work?

12 次查看(过去 30 天)
i am trying to read a local mms stream and i get the present error on the scipt....
Error in ==> Untitled2 at 6
hSrc = vision.VideoFileReader(filename);
thats the code i am trying to run with no luck...
can someone give me an advise?
sendReceive = 'recieve';
url = 'mms://127.0.0.1:3044';
filename = 'hello.avi';
if strcmpi(sendReceive, 'recieve')
% Create objects
hSrc = vision.VideoFileReader(filename);
hSnk = vision.VideoFileWriter;
% Set parameters
hSnk.FileFormat = 'WMV';
hSnk.AudioInputPort = false;
hSnk.Filename = url;
% Run loop. Ctrl-C to exit
while true
data = step(hSrc);
step(hSnk, data);
end
else
% Create objects
hSrc = vision.VideoFileReader;
hSnk = vision.DeployableVideoPlayer;
% Set parameters
hSrc.Filename = url;
% Run loop. Ctrl-C to exit
while true
data = step(hSrc);
step(hSnk, data);
end
end

回答(1 个)

nik
nik 2014-2-13
Error in ==> Untitled2 at 1 if strcmpi(sendReceive, ' receive')
thats the error i get

Community Treasure Hunt

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

Start Hunting!

Translated by