Reputation: 13614
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.
Upvotes: 0
Views: 4016
Reputation: 368
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
Upvotes: 0
Reputation: 581
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.
Upvotes: 3
Reputation: 978
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:
cd to (matlabroot)/sys/os/glnxa64/
Rename libstdc++.so.6 to backuplibstdc++.so.6
Rename libstdc++.so.6.0.10 to backuplibstdc++.so.6.0.10
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
Upvotes: 0