Issues with vlc.input.time not updating
Posted: 02 Feb 2015 22:36
I am using ActiveX to embed VLC 2.1.5 within a MATLAB (R2014b) figure. While playing a video, I want to display the video time stamp multiple times per second using a timer. This all works quite nicely, except that the time stamp does not increment as fast as I'd like. If this were the case, the output would look like: 0.000, 0.100, ... , 2.000. Instead, it seems to repeat certain numbers (as shown below). Is this an issue of how I am querying the time stamp or does it just not update fast enough? Does the update speed vary by computer?
Example Output:
Code: Select all
fig = figure;
vlc = actxcontrol('VideoLAN.VLCPlugin.2',[0 0 400 300],fig);
t = timer(...
'ExecutionMode','fixedRate', ...
'Period',0.10, ...
'TasksToExecute',20,...
'TimerFcn','disp(vlc.input.time/1000);',...
'StopFcn','vlc.playlist.stop()');
vlc.playlist.add('file://localhost/video.mp4');
vlc.playlist.play();
start(t);
Code: Select all
0.000
0.307
0.601
0.601
0.601
0.903
0.903
0.903
1.202
1.202
1.202
1.502
1.502
1.502
1.800
1.800
1.800
2.102
2.102
2.102
2.401