Warning: Unable to determine the number of frames in this file

16 篇文章 0 订阅

之前通过下面的代码读取,没有错误:

videoObj = VideoReader('..\..\dataset\smoke-detection\ForestSmoke\Smoke_Manavgat_Raw.avi');
numFrames = get(videoObj, 'NumberOfFrames');
后来在安装了一堆其他软件之后,特别是安装完美解码之后,就产生Warning: Unable to determine the number of frames in this file的警告,参考[1][2]给出了一种解决方法:

frame=read(obj,inf);
obj.NumberOfFrames
是通过读取最后一帧图像来确定的,但是当视频有点长的时候,确定这最后一帧就会特别慢。

在我运行程序之前

在我点击运行中断后:


这个LAV是一个什么东西?


我想大概就是这个LAV Splitter影响了Matlab,因此只需关闭它既可。找了好久发现在在完美解码的设置里面可以关掉:


这个分离器对AVI格式默认的是LAV,需要改回system既可。然后在运行matlab,就不会产生Warning: Unable to determine the number of frames in this file了,大笑

参考:

【1】matlab   VideoReader Warning: Unable to determine the&nb  http://blog.sina.com.cn/s/blog_6051d8810101js31.html

【2】Thread Subject: Video info for non-AVI's http://www.mathworks.com/matlabcentral/newsreader/view_thread/139245

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值