hello I have a problem with videoreader on matlab R2016a with ubtuntu LTS16.04

hello, I tried to use videoreader on matlab R2016a on ubuntu LTS 16.04. I first encounter an error message as follow:
'Error using VideoReader/init (line 619) The VideoReader plugin libmwgstreamerplugin failed to load properly.
Error in VideoReader (line 172) obj.init(fileName);'
which wasn't solved by the workaround in the solution 1246784 (still unlinking successfully the libstdc++.so.6.0.17 version of matlab and the libstdc++.so.6.0.21 version of ubuntu, cf. http://www.mathworks.com/support/bugreports/1246784)
and rather installing gstreamer-0.10 plugins partially change the problem to:
'v=VideoReader('xylophone.mp4');
giving
Error using VideoReader/init (line 619) Could not read file due to an unexpected error. Reason: Unable to initialize the video obtain properties'
this latter installation wasn't straightforward as gstplugin doesn't includes all packages for ubuntu http://ubuntuforums.org/showthread.php?t=1658232 Error in VideoReader (line 172) obj.init(fileName);'
If anyone has any idea? In advance thanks you for time and support

8 Comments

sudo add-apt-repository ppa:mc3man/gstffmpeg-keep
sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg
It works for me.
I am having the same issue. Despite having the latest gstreamer0.10 plugin, and following MathWork's bug fix (solution 1246784), I can't read AVI files. This is a huge workflow disruption for me and (I'm sure) many others. I am getting the following error:
Error using VideoReader/init (line 619)
Failed to initialize internal resources.
Error in VideoReader (Line 172)
obj.init(fileName)
Same problem. Tried the unlinking solution and it did not work for me. When I try to open the video with Totem payer it wants to install gstreamer1.0 plugins to play it, but I know Matlab does not support them yet...
I have Matlab 2016b and Ubuntu 16.04
I had the same problem with mp4 file.
Error using VideoReader/init (line 619) Failed to initialize internal resources.
Error in VideoReader (line 172) obj.init(fileName);
And "sudo apt-get install gstreamer0.10-*" solved my issue.
Barev Vardan,
I'm still struggling with this. I can read videos now but every time I try to access the video I get the following message:
GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed
Could you post your final list of plugins that successfully works with Matlab? What do you get as an output of this?
dpkg -l | grep gstreame
I want to add something to this solution. It is not sufficient to run
sudo apt-get install gstreamer0.10-*
in Ubuntu 16.04 LTS. Lets have a look which gstreamer packages are installed:
dpkg -l | grep gstreamer
ii gir1.2-gstreamer-0.10 0.10.36-1.5ubuntu1 amd64 Description: GObject introspection data for the GStreamer library
ii gstreamer-qapt 3.0.2-0ubuntu1.1 amd64 GStreamer plugin to install codecs using QApt
ii gstreamer0.10-alsa:amd64 0.10.36-2 amd64 GStreamer plugin for ALSA
ii gstreamer0.10-doc 0.10.36-1.5ubuntu1 all GStreamer core documentation and manuals
ii gstreamer0.10-gconf:amd64 0.10.31-3+nmu4ubuntu2.16.04.2 amd64 GStreamer plugin for getting the sink/source information from GConf
ii gstreamer0.10-gnomevfs:amd64 0.10.36-2 amd64 GStreamer plugin for GnomeVFS
ii gstreamer0.10-nice:amd64 0.1.13-0ubuntu2 amd64 ICE library (GStreamer 0.10 plugin)
ii gstreamer0.10-plugins-base:amd64 0.10.36-2 amd64 GStreamer plugins from the "base" set
ii gstreamer0.10-plugins-base-apps 0.10.36-2 amd64 GStreamer helper programs from the "base" set
ii gstreamer0.10-plugins-base-dbg:amd64 0.10.36-2 amd64 GStreamer plugins from the "base" set
ii gstreamer0.10-plugins-base-doc 0.10.36-2 all GStreamer documentation for plugins from the "base" set
ii gstreamer0.10-plugins-good:amd64 0.10.31-3+nmu4ubuntu2.16.04.2 amd64 GStreamer plugins from the "good" set
ii gstreamer0.10-plugins-good-dbg:amd64 0.10.31-3+nmu4ubuntu2.16.04.2 amd64 GStreamer plugins from the "good" set
ii gstreamer0.10-plugins-good-doc 0.10.31-3+nmu4ubuntu2.16.04.2 all GStreamer documentation for plugins from the "good" set
ii gstreamer0.10-pulseaudio:amd64 0.10.31-3+nmu4ubuntu2.16.04.2 amd64 GStreamer plugin for PulseAudio
ii gstreamer0.10-qapt 3.0.2-0ubuntu1.1 all transitional dummy package
ii gstreamer0.10-tools 0.10.36-1.5ubuntu1 amd64 Tools for use with GStreamer
ii gstreamer0.10-x:amd64 0.10.36-2 amd64 GStreamer plugins for X11 and Pango
ii libgstreamer-plugins-bad1.0-0:amd64 1.8.3-1ubuntu0.2 amd64 GStreamer development files for libraries from the "bad" set
ii libgstreamer-plugins-base0.10-0:amd64 0.10.36-2 amd64 GStreamer libraries from the "base" set
ii libgstreamer-plugins-base1.0-0:amd64 1.8.3-1ubuntu0.1 amd64 GStreamer libraries from the "base" set
ii libgstreamer-plugins-good1.0-0:amd64 1.8.3-1ubuntu0.3 amd64 GStreamer development files for libraries from the "good" set
ii libgstreamer0.10-0:amd64 0.10.36-1.5ubuntu1 amd64 Core GStreamer libraries and elements
ii libgstreamer0.10-dev 0.10.36-1.5ubuntu1 amd64 GStreamer core development files
ii libgstreamer1.0-0:amd64 1.8.3-1~ubuntu0.1 amd64 Core GStreamer libraries and elements
ii libreoffice-avmedia-backend-gstreamer 1:5.1.4-0ubuntu1 amd64 GStreamer backend for LibreOffice
ii phonon-backend-gstreamer-common:amd64 4:4.8.2-0ubuntu2 amd64 Phonon GStreamer 1.0.x backend icons
An important package is missing:
sudo apt-get install gstreamer0.10-ffmpeg
[sudo] password for matlab:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gstreamer0.10-ffmpeg
E: Couldn't find any package by glob 'gstreamer0.10-ffmpeg'
Fortunately you get this package from a PPA by Doug McMahon.
Add the PPA to Ubuntu and than install gstreamer0.10-ffmpeg again.
sudo add-apt-repository ppa:mc3man/gstffmpeg-keep
sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg
Since then my Matlab is running error free :D
Is there a solution for Ubuntu 17.04 ?
I tried
sudo add-apt-repository ppa:mc3man/gstffmpeg-keep
sudo apt-get update
It gave me the error below. I guess it is because the Zesty(Ubuntu 17.04) is not available at PPA right now. https://launchpad.net/ubuntu/zesty/+source/gstreamer0.10-ffmpeg
W: The repository 'http://ppa.launchpad.net/mc3man/gstffmpeg-keep/ubuntu zesty Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/mc3man/gstffmpeg-keep/ubuntu/dists/zesty/main/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
This did not work for me in 16.04 with matlab 2016b

Sign in to comment.

Answers (4)

I fixed the problem by installing gstream0.10 and after that, we need to make sure that the plugins are also installed, especially the gstream0.10's plugins and not any other higher versions plugin.
for that I ran
sudo apt-get install gstreamer0.10-*
you could view the list of plugins
dpkg -l | grep gstreamer
The list of plugins in my case was
ii gir1.2-gstreamer-0.10 0.10.36-1.5ubuntu1 amd64 Description: GObject introspection data for the GStreamer library
ii gir1.2-gstreamer-1.0 1.8.2-1~ubuntu1 amd64 GObject introspection data for the GStreamer library
ii gstreamer-qapt 3.0.2-0ubuntu1.1 amd64 GStreamer plugin to install codecs using QApt
ii gstreamer-tools 0.10.36-1.5ubuntu1 amd64 Tools for use with GStreamer
ii gstreamer0.10-alsa:amd64 0.10.36-2 amd64 GStreamer plugin for ALSA
ii gstreamer0.10-doc 0.10.36-1.5ubuntu1 all GStreamer core documentation and manuals
ii gstreamer0.10-ffmpeg:amd64 0.10.13-5ubuntu1~wily amd64 FFmpeg plugin for GStreamer
ii gstreamer0.10-ffmpeg-dbg:amd64 0.10.13-5ubuntu1~wily amd64 FFmpeg plugin for GStreamer (debug symbols)
ii gstreamer0.10-gconf:amd64 0.10.31-3+nmu4ubuntu2~gcc5.1 amd64 GStreamer plugin for getting the sink/source information from GConf
ii gstreamer0.10-gnomevfs:amd64 0.10.36-2 amd64 GStreamer plugin for GnomeVFS
ii gstreamer0.10-nice:amd64 0.1.13-0ubuntu2 amd64 ICE library (GStreamer 0.10 plugin)
ii gstreamer0.10-plugins-base:amd64 0.10.36-2 amd64 GStreamer plugins from the "base" set
ii gstreamer0.10-plugins-base-apps 0.10.36-2 amd64 GStreamer helper programs from the "base" set
ii gstreamer0.10-plugins-base-dbg:amd64 0.10.36-2 amd64 GStreamer plugins from the "base" set
ii gstreamer0.10-plugins-base-doc 0.10.36-2 all GStreamer documentation for plugins from the "base" set
ii gstreamer0.10-plugins-good:amd64 0.10.31-3+nmu4ubuntu2~gcc5.1 amd64 GStreamer plugins from the "good" set
ii gstreamer0.10-plugins-good-dbg:amd64 0.10.31-3+nmu4ubuntu2~gcc5.1 amd64 GStreamer plugins from the "good" set
ii gstreamer0.10-plugins-good-doc 0.10.31-3+nmu4ubuntu2~gcc5.1 all GStreamer documentation for plugins from the "good" set
ii gstreamer0.10-pulseaudio:amd64 0.10.31-3+nmu4ubuntu2~gcc5.1 amd64 GStreamer plugin for PulseAudio
ii gstreamer0.10-qapt 3.0.2-0ubuntu1.1 all transitional dummy package
ii gstreamer0.10-tools 0.10.36-1.5ubuntu1 amd64 Tools for use with GStreamer
ii gstreamer0.10-x:amd64 0.10.36-2 amd64 GStreamer plugins for X11 and Pango

5 Comments

If you want specific plugins to be only installed tweak the sudo apt command to match the plugins listed above.
Thanks, Dhananjayan. S
I have a similar problem. The error I get is
Error using VideoReader/init (line 619)
Failed to initialize internal resources.
Error in VideoReader (line 172)
obj.init(fileName);
I use Matlab2016a on a RHEL7 machine. Reading your previous comments, I think I installed the suggested package (I would appreciate directions to install the package on RHEL) , along with VLC. After installing the packages, I can play some of the videos I wasn't able to play before. But other videos only play on my computer using VLC and Videos. Matlab still throughs this error on me. Any suggestions are much appreciated. Thanks
Thanks Dhanaanjayan,
After installing all gstream0.10 plugins I still have some gstreamer1.0 left that came with Ubuntu however, and Totem Player also wants to install gstreamer1.0-libav to even just play the video.Not sure how to proceed. I contacted Matlab support but still haven't heard from them.
Here is my list of plugins:
~$ dpkg -l | grep gstreamer
ii gir1.2-gstreamer-0.10 0.10.36-1.5ubuntu1 amd64 Description: GObject introspection data for the GStreamer library
ii gir1.2-gstreamer-1.0 1.8.2-1~ubuntu1 amd64 GObject introspection data for the GStreamer library
ii gstreamer-qapt 3.0.2-0ubuntu1.1 amd64 GStreamer plugin to install codecs using QApt
ii gstreamer-tools 0.10.36-1.5ubuntu1 amd64 Tools for use with GStreamer
ii gstreamer0.10-alsa:amd64 0.10.36-2 amd64 GStreamer plugin for ALSA
ii gstreamer0.10-doc 0.10.36-1.5ubuntu1 all GStreamer core documentation and manuals
ii gstreamer0.10-ffmpeg:amd64 0.10.13-5ubuntu1~wily amd64 FFmpeg plugin for GStreamer
ii gstreamer0.10-ffmpeg-dbg:amd64 0.10.13-5ubuntu1~wily amd64 FFmpeg plugin for GStreamer (debug symbols)
ii gstreamer0.10-gconf:amd64 0.10.31-3+nmu4ubuntu2~gcc5.1 amd64 GStreamer plugin for getting the sink/source information from GConf
ii gstreamer0.10-gnomevfs:amd64 0.10.36-2 amd64 GStreamer plugin for GnomeVFS
ii gstreamer0.10-nice:amd64 0.1.13-0ubuntu2 amd64 ICE library (GStreamer 0.10 plugin)
ii gstreamer0.10-plugins-base:amd64 0.10.36-2 amd64 GStreamer plugins from the "base" set
ii gstreamer0.10-plugins-base:i386 0.10.36-2 i386 GStreamer plugins from the "base" set
ii gstreamer0.10-plugins-base-apps 0.10.36-2 amd64 GStreamer helper programs from the "base" set
ii gstreamer0.10-plugins-base-dbg:amd64 0.10.36-2 amd64 GStreamer plugins from the "base" set
ii gstreamer0.10-plugins-base-doc 0.10.36-2 all GStreamer documentation for plugins from the "base" set
ii gstreamer0.10-plugins-good:amd64 0.10.31-3+nmu4ubuntu2~gcc5.1 amd64 GStreamer plugins from the "good" set
ii gstreamer0.10-plugins-good:i386 0.10.31-3+nmu4ubuntu2~gcc5.1 i386 GStreamer plugins from the "good" set
ii gstreamer0.10-plugins-good-dbg:amd64 0.10.31-3+nmu4ubuntu2~gcc5.1 amd64 GStreamer plugins from the "good" set
ii gstreamer0.10-plugins-good-doc 0.10.31-3+nmu4ubuntu2~gcc5.1 all GStreamer documentation for plugins from the "good" set
ii gstreamer0.10-pulseaudio:amd64 0.10.31-3+nmu4ubuntu2~gcc5.1 amd64 GStreamer plugin for PulseAudio
ii gstreamer0.10-qapt 3.0.2-0ubuntu1.1 all transitional dummy package
ii gstreamer0.10-tools 0.10.36-1.5ubuntu1 amd64 Tools for use with GStreamer
ii gstreamer0.10-x:amd64 0.10.36-2 amd64 GStreamer plugins for X11 and Pango
ii gstreamer0.10-x:i386 0.10.36-2 i386 GStreamer plugins for X11 and Pango
ii gstreamer1.0-alsa:amd64 1.8.2-1ubuntu0.1 amd64 GStreamer plugin for ALSA
ii gstreamer1.0-clutter-3.0 3.0.18-1 amd64 Clutter PLugin for GStreamer 1.0
ii gstreamer1.0-plugins-base:amd64 1.8.2-1ubuntu0.1 amd64 GStreamer plugins from the "base" set
ii gstreamer1.0-plugins-good:amd64 1.8.2-1ubuntu0.1 amd64 GStreamer plugins from the "good" set
ii gstreamer1.0-pulseaudio:amd64 1.8.2-1ubuntu0.1 amd64 GStreamer plugin for PulseAudio
ii gstreamer1.0-x:amd64 1.8.2-1ubuntu0.1 amd64 GStreamer plugins for X11 and Pango
ii libgstreamer-plugins-base0.10-0:amd64 0.10.36-2 amd64 GStreamer libraries from the "base" set
ii libgstreamer-plugins-base0.10-0:i386 0.10.36-2 i386 GStreamer libraries from the "base" set
ii libgstreamer-plugins-base0.10-dev 0.10.36-2 amd64 GStreamer development files for libraries from the "base" set
ii libgstreamer-plugins-base1.0-0:amd64 1.8.2-1ubuntu0.1 amd64 GStreamer libraries from the "base" set
ii libgstreamer-plugins-good1.0-0:amd64 1.8.2-1ubuntu0.1 amd64 GStreamer development files for libraries from the "good" set
ii libgstreamer0.10-0:amd64 0.10.36-1.5ubuntu1 amd64 Core GStreamer libraries and elements
ii libgstreamer0.10-0:i386 0.10.36-1.5ubuntu1 i386 Core GStreamer libraries and elements
ii libgstreamer0.10-dev 0.10.36-1.5ubuntu1 amd64 GStreamer core development files
ii libgstreamer1.0-0:amd64 1.8.2-1~ubuntu1 amd64 Core GStreamer libraries and elements
ii libreoffice-avmedia-backend-gstreamer 1:5.1.4-0ubuntu1 amd64 GStreamer backend for LibreOffice
ii phonon-backend-gstreamer:amd64 4:4.8.2-0ubuntu2 amd64 Phonon GStreamer 1.0 backend
ii phonon-backend-gstreamer-common:amd64 4:4.8.2-0ubuntu2 amd64 Phonon GStreamer 1.0.x backend icons
Did you figure out the problem Mikheil Azatov ?

Sign in to comment.

Is there a solution for Ubuntu 17.04 ?
I tried
sudo add-apt-repository ppa:mc3man/gstffmpeg-keep
sudo apt-get update
It gave me the error below. I guess it is because the Zesty(Ubuntu 17.04) is not available at PPA right now.
W: The repository 'http://ppa.launchpad.net/mc3man/gstffmpeg-keep/ubuntu zesty Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/mc3man/gstffmpeg-keep/ubuntu/dists/zesty/main/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
I've encountered the same problem on Ubuntu 17, If you have solved it, plz tell me ths.
I have the same problem on Ubuntu 17.10, the gstreamer-ffmpeg package cannot be installed

Categories

Asked:

on 7 Jul 2016

Commented:

on 12 Aug 2018

Community Treasure Hunt

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

Start Hunting!