zoukankan      html  css  js  c++  java
  • MATLAB读视频报错 Unable to initialize the video obtain properties (videoreader in Matlab)

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

    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);

    环境:Ubuntu16.04

    参考:stackoverflow

    首先安装gstreamer0.10-ffmpeg

    1 sudo add-apt-repository ppa:mc3man/gstffmpeg-keep
    2 sudo apt-get update
    3 sudo apt-get install gstreamer0.10-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/
  • 相关阅读:
    递归
    数据结构与算法-复杂度分析
    'latin-1' codec can't encode characters in position解决字符问题
    redis理解
    spring 嵌套事务问题
    Parameterized testing with any Python test framework
    分布式事务测试考虑点
    python orm / 表与model相互转换
    Python多线程、多进程
    JS运动
  • 原文地址:https://www.cnblogs.com/demian/p/10128887.html
Copyright © 2011-2022 走看看