Question

When I try to read a video with the VideoReader object it gives the following error

Error using VideoReader/init (line 429)
The file requires the following codec(s) to be installed on your system:
    video/x-h264

Has anyone seen this problem before?

By the way, I installed all the Gstream libraries and codes as well as the x-h264 codec.

No correct solution

OTHER TIPS

Add this ppa:

sudo add-apt-repository ppa:mc3man/trusty-media

and then

sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg

Had the same problem, doing this fixed it.

If you can play the videos with VLC player, then the following worked for me:

As a workaround you can run MATLAB on the version of libstdc++ installed on your system:

  1. cd to (matlabroot)/sys/os/glnxa64/

  2. Rename libstdc++.so.6 to backuplibstdc++.so.6

  3. Rename libstdc++.so.6.0.10 to backuplibstdc++.so.6.0.10

  4. Restart MATLAB and execute the code again.

The steps are from this link: http://uk.mathworks.com/matlabcentral/answers/94531-why-do-i-receive-an-error-when-creating-a-videoreader-object-on-linux-in-matlab-r2010b-7-11

A simple solution is to install ffmpeg and then use this function:

function v=readVideo(path_file)

system(['rm /tmp/video_tmp.avi']);
system(['ffmpeg -i ' path_file ' -vcodec copy -acodec copy /tmp/video_tmp.avi']);

v = VideoReader('/tmp/video_tmp.avi')

end
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top