Matlab mmreader issue in Ubuntu 12.04
Ältere Kommentare anzeigen
I have installed Ubuntu 12.04 and run tried to extract the frames from a video. For that, I used the following code
clear all;
clc;
close all;
xyloObj = mmreader('/home/user/Work/Person01.mpg');
nFrames = xyloObj.NumberOfFrames;
vidHeight = xyloObj.Height;
vidWidth = xyloObj.Width;
% Preallocate movie structure.
mov(1:nFrames) = ...
struct('cdata', zeros(vidHeight, vidWidth, 3, 'uint8'),...
'colormap', []);
% Read one frame at a time.
for k = 1 : nFrames
mov(k).cdata = read(xyloObj, k);
end
% Size a figure based on the video's width and height.
hf = figure;
set(hf, 'position', [150 150 vidWidth vidHeight])
% Play back the movie once at the video's frame rate.
movie(hf, mov, 1, xyloObj.FrameRate);
But, it giving the following error
??? Could not seek to frame. Frame accurate seeking is not supported for this file on the current platform.
Error in ==> mmreader.read at 74 videoFrames = read(getImpl(obj), index);
Error in ==> video_play2 at 19 mov(k).cdata = read(xyloObj, k);
What will be the issue ? How can I solve this problem ?
Antworten (1)
Walter Roberson
am 20 Jul. 2012
Read the entire movie instead.
mov = read(xyloObj);
3 Kommentare
Hari
am 30 Jul. 2012
Helga Soundarya
am 12 Mär. 2018
Bearbeitet: Walter Roberson
am 12 Mär. 2018
"Could not seek to frame. Frame accurate seeking is not supported for this file on the current platform ",
this error occurs due to some updates in windows. If we uninstall the update, then this command will work smoothly
Walter Roberson
am 12 Mär. 2018
Thanks for the information Helga.
The original question has to do with Linux which handles reading a different way.
When I look at the error now my guess for the original question would be that the person did not have gstreamer 0.1 installed. Linux versions stopped installing that old version about the time of the question.
Kategorien
Mehr zu Large Files and Big Data finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!