Matlab mmreader issue in Ubuntu 12.04

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 ?

Réponses (1)

Walter Roberson
Walter Roberson le 20 Juil 2012
Read the entire movie instead.
mov = read(xyloObj);

3 commentaires

Still it showing
??? Could not seek to frame. Frame accurate seeking is not supported for this
file on the current platform.
Error in ==> mmreader.read at 67
videoFrames = read(getImpl(obj));
Error in ==> video_read_error at 16
mov = read(xyloObj);
and it also showing the following error message in the terminal
(MATLAB:4150): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstffmpeg.so': /opt/matlab/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libdirac_encoder.so.0)
(MATLAB:4150): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstffmpeg.so': /opt/matlab/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libdirac_encoder.so.0)
(MATLAB:4150): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstffmpeg.so': /opt/matlab/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libdirac_encoder.so.0)
(MATLAB:4150): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstffmpeg.so': /opt/matlab/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libdirac_encoder.so.0)
(MATLAB:4150): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstffmpeg.so': /opt/matlab/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libdirac_encoder.so.0)
(MATLAB:4150): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstffmpeg.so': /opt/matlab/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libdirac_encoder.so.0)
Helga  Soundarya
Helga Soundarya le 12 Mar 2018
Modifié(e) : Walter Roberson le 12 Mar 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
Walter Roberson le 12 Mar 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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Large Files and Big Data dans Centre d'aide et File Exchange

Question posée :

le 20 Juil 2012

Commenté :

le 12 Mar 2018

Community Treasure Hunt

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

Start Hunting!

Translated by