Matlab libraries in Ubuntu

4

I just installed matlab on my computer, seemingly successfully, but I've been trying to run a program, and I'm getting the following error:

>> reproduceResults
Warning: Directory already exists. 
> In reproduceResults at 14 
Processing ./data/baby.mp4
Error using VideoReader/init (line 429)
The file requires the following codec(s) to be installed on your system:
    video/x-h264


Error in VideoReader (line 132)
            obj.init(fileName);

Error in amplify_spatial_lpyr_temporal_iir (line 31)
    vid = VideoReader(vidFile);

Error in reproduceResults (line 20)
amplify_spatial_lpyr_temporal_iir(inFile, resultsDir, 10, 16, 0.4, 0.05, 0.1);

>> 

For reference, the code that I'm trying to run is here: http://people.csail.mit.edu/mrub/vidmag/#code

I'm running reproduceResults.m, after downloading all of the video files that they provided.

Any help would be appreciated!


I can't find any answers on google that work. The one that I've tried is this: http://memyselfandcomputer.blogspot.com/2011/01/matlab-2010-videox-h264-error-on-ubuntu.html

It doesn't seem to change anything though. Is there a way to get a more verbose output to help me debug/search better?

theicfire

Posted 2012-11-01T16:05:07.803

Reputation: 243

I'm asked to log in when I click the last link in your post, by the way, so I don't know what you've tried already, but have you tried installing the x264 package? It might be named something slightly different in Ubuntu, but run apt-cache search x264 and I can try to advise you. – Ricardo Altamirano – 2013-03-03T22:49:57.567

Answers

4

A little late but I also ran into the same issue. One fix is to install the codecs via apt-get:

sudo apt-get -y install gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse

This fixed it for me.

Ming K

Posted 2012-11-01T16:05:07.803

Reputation: 141

This should be marked as the answer – twerdster – 2015-07-19T16:56:54.297

2I had to remove the last package: sudo apt-get -y install gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly ` – auraham – 2013-10-05T05:07:02.497

I had success on a Matlab Amazon EC2 instance with even fewer packages: sudo apt-get -y install gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly

– Daniel Golden – 2014-04-15T22:33:14.693

0

Here is a thread that suggests multiple solutions, hopefully it contains the right one for you: http://ubuntuforums.org/showthread.php?t=775943

Dennis Jaheruddin

Posted 2012-11-01T16:05:07.803

Reputation: 378

0

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg

Add this ppa for gstreamer0.10-ffmpeg on 14.04, had the same problem and fixed for me now.

BrendanBenting

Posted 2012-11-01T16:05:07.803

Reputation: 111

1I'd note that it looks like those repositories are specific to 14.04 (which this question pre-dates). I'm also curious to what this offers over the default repos – Journeyman Geek – 2014-05-09T10:19:05.903

For 14.04, this ppa is needed to install gstreamer0.10-ffmpeg - the package in the default repo cannot currently be installed on 14.04. – funkotron – 2014-05-27T12:41:14.687