这个bug卡了半天,这里记录一下

Error using VideoReader/init (line ) Could not read file due to an unexpected error. Reason: Unable to initialize the video obtain properties

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

环境:Ubuntu16.04

参考:stackoverflow

首先安装gstreamer0.10-ffmpeg

 sudo add-apt-repository ppa:mc3man/gstffmpeg-keep
sudo apt-get update
sudo apt-get install gstreamer0.-ffmpeg

重启MATLAB,如果像我一样还是报错,别慌,继续安装codecs(解码器)

sudo apt install ubuntu-restricted-extra
 
若可以读取部分视频但仍提示的这个错误,为什么仍然报错orz
因为libstdc++的库要比ubuntu16.04的库版本更新。
cd /你自己安装的matlab目录/sys/os/glnxa64
ls -l
这时应该看到自己的链接库为libstdc++.so.6.0.20
cd /usr/lib/x86_64-linux-gnu 
ls -l libstdc++*
若列表里,版本高于6.0.20

(找到了问题)
然后
cd /你自己安装的matlab目录/sys/os/glnxa64
sudo unlink libstdc++.so.6
sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6
重启MATLAB后,问题解决。
PS:MATLAB官网说,MatlabR2016b以后的版本,解决了这个问题。
另外找不到java lib记得配置环境变量
export MATLAB_JAVA=/usr/local/MATLAB/R2017b/sys/java/jre/glnxa64/jre/

MATLAB读视频报错 Unable to initialize the video obtain properties (videoreader in Matlab)的更多相关文章

  1. delphi调试需要管理员权限程序报错“Unable to create process:请求的操作需要提升”

    delphi调试启动需要UAC权限的程序的时候会报错“Unable to create process:请求的操作需要提升”.这是因为delphi没有以管理员身份启动,这样delphi createp ...

  2. MediaPlayer 播放assets 文件夹下面的视频报错

    Android MediaPlayer 播放assets 文件夹下面的视频报错 报下面的错: java.io.FileNotFoundException: This file can not be o ...

  3. 64位linux报错Could not initialize class java.awt.image.BufferedImage

    最近碰到一个问题: 64位linux报错Could not initialize class java.awt.image.BufferedImage 在WIN平台下运行正常BufferedImage ...

  4. AS添加依赖报错Unable to merge dex

    AS添加依赖报错Unable to merge dex 最近在给项目添加依赖的时候,要给项目导入Bmob的SDK,参照Bmob的官方文档,可以直接在app的build.gradle文件中添加 //Bm ...

  5. centos6.5环境wget报错Unable to establish SSL connection

    centos6.5环境wget报错Unable to establish SSL connection [root@centossz008 src]# wget --no-check-certific ...

  6. linux 下通过xhost进入图形界面,经常会出现报错“unable to open display”

    linux 下通过xhost进入图形界面,经常会出现报错“unable to  open display” linux下的操作步骤如下: [root@localhost ~]# vncserver N ...

  7. git clone 报错Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

    在执行git clone命令报错 Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange metho ...

  8. Git clone 报错 Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc

    git clone 报错 Unable to negotiate with xxx.xxx.xxx.xxx. port 12345: no matching cipher found. Their o ...

  9. C# 解决SharpSvn启动窗口报错 Unable to connect to a repository at URL 'svn://....'

    在远程机打开sharpsvn客户端测试,结果报错 Svn启动窗口报错 Unable to connect to a repository at URL 'svn://...' 咋整,我在win10我的 ...

随机推荐

  1. poj 1015 Jury Compromise(背包变形dp)

    In Frobnia, a far-away country, the verdicts in court trials are determined by a jury consisting of ...

  2. linux device drivers ch01

    ch01. 设备驱动程序简介 设备驱动程序的作用在于提供机制(需要提供什么功能),而不是提供策略(如何使用这些功能). 内核功能划分: 进程管理:进程创建.销毁.进程间通信.共享cpu调度器. 内存管 ...

  3. 状态压缩动态规划 状压DP

    总述 状态压缩动态规划,就是我们俗称的状压DP,是利用计算机二进制的性质来描述状态的一种DP方式 很多棋盘问题都运用到了状压,同时,状压也很经常和BFS及DP连用,例题里会给出介绍 有了状态,DP就比 ...

  4. oldboy s21day12.设计商城系统,主要提供两个功能:商品管理、会员管理。

    #!/usr/bin/env python# -*- coding:utf-8 -*- # 1.写出三元运算的基本格式及作用?'''a if a>b else b''' # 2.什么是匿名函数? ...

  5. JGUI源码:解决手机端点击出现半透明阴影(4)

    下面开始进入正题,问题发现与解决 1.According解决手机浏览器点击出现半透明阴影 手机下点击有白色蒙版,原始效果如下,看起来很不协调 2.解决办法:增加 -webkit-tap-highlig ...

  6. [物理学与PDEs]第1章第1节 引言

    1. 电动力学研究的对象是电磁场, 研究电磁场的基本属性---运动规律及它和带电物质的相互作用. 2. 场, 物质的一种存在方式. 3. Maxwell 方程组是电动力学中的基本方程, 是一切有关电磁 ...

  7. jpa/hibernate @onetomany 使用left join 添加多条件,可以使用过滤器filters (with-clause not allowed on fetched associations; use filters异常信息)

    package com.ipinyou.mip.dataAsset.campaignManagement.entity; import com.ipinyou.mip.utils.NumberUtil ...

  8. 调用腾讯、百度翻译API,实现游戏机翻通用程序

    最近玩了款steam独立游戏,没中文,只能自己汉化了,用腾讯跟百度的API实现了一个通用的机翻程序(只需要导入JSON文本), 同样,比较懒,还没写,先占坑

  9. Nginx 站点设置目录列表显示

    Nginx 站点目录列表显示. 可以编辑添加在 server { } 模块 或者 location { } 模块下. autoindex on; # 开启目录文件列表 autoindex_exact_ ...

  10. 递归 - Leetcode 110 判断二叉树是否为平衡二叉树

    110. Balanced Binary Tree Given a binary tree, determine if it is height-balanced. For this problem, ...