Matlab的VideoReader在Ubuntu 17.04上不起作用 [英] Matlab's VideoReader not working on Ubuntu 17.04

查看:350
本文介绍了Matlab的VideoReader在Ubuntu 17.04上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力让VideoReader在Ubuntu 17.04上运行.如果我运行一个简单程序:

v = VideoReader('flame.avi')

我得到以下信息:

Error using VideoReader/init (line 619)

Could not read file due to an unexpected error. Reason: Unable to initialize the video obtain properties

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

现在,我做了一些挖掘工作,大多数人都说此错误是由于未安装gstreamer0.10而引起的.

请参阅: https://www .mathworks.com/matlabcentral/answers/165584-cannot-read-video-matlab-2014b-linux

这说gstreamer1.0不足以解决此问题: https://www.mathworks.com/matlabcentral/Answers/255157无法在ubuntu-15-04-上的matlab-r2015中使用videoreader加载视频无法读取文件

问题来自尝试安装gstreamer0.10.在Ubuntu 17中似乎无法正常工作.

此人讨论了gstreamer如何在Ubuntu 17上不起作用:解决方案

我的一位同事找到了指向解决我的问题的帖子的链接https://www.mathworks.com/matlabcentral/answers/165584-cannot-read-video-matlab-2014b-linux

This one says that gstreamer1.0 is not sufficient to fix this problem: https://www.mathworks.com/matlabcentral/answers/255157-can-t-load-video-using-videoreader-in-matlab-r2015-on-ubuntu-15-04-could-not-read-file-due-to-an-un

The problem comes from trying to install gstreamer0.10. It doesn't appear to be working in Ubuntu 17.

This one talks about how gstreamer isn't working on Ubuntu 17: https://www.mathworks.com/matlabcentral/answers/294258-hello-i-have-a-problem-with-videoreader-on-matlab-r2016a-with-ubtuntu-lts16-04

I was wondering if anyone had any ideas on how to overcome this issue? Is there a different package that I could install that would fulfill the same requirements? I have tried installing matlab-support, and that hasn't helped either. Is there a different issue other than gstreamer0.10?

I would prefer not to re-install Ubuntu 16.04, but understand if that is the only way. But surely, someone has gotten MATLAB working on Ubuntu 17?

解决方案

A colleague of mine found a link to a post that solved my problem https://www.mathworks.com/matlabcentral/answers/329796-issue-with-libstdc-so-6

Essentially, you need to redirect MATLAB and tell it to not use its default libstdc++6 file and use your Linux system's instead. I went with the solution at the bottom, and wrote an alias for my .bashrc file.

alias matlab='LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 /usr/local/bin/matlab -desktop'

After testing it out, I have confirmed it works.

这篇关于Matlab的VideoReader在Ubuntu 17.04上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆