Matlab mmreader issue in Ubuntu 12.04
Mostrar comentarios más antiguos
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 ?
Respuestas (1)
Walter Roberson
el 20 de Jul. de 2012
Read the entire movie instead.
mov = read(xyloObj);
3 comentarios
Hari
el 30 de Jul. de 2012
Helga Soundarya
el 12 de Mzo. de 2018
Editada: Walter Roberson
el 12 de Mzo. de 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
el 12 de Mzo. de 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.
Categorías
Más información sobre Large Files and Big Data en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!