在Matlab中读取电影文件:在完全读取请求的帧之前,已到达文件末尾 [英] Reading a movie file in Matlab: The end of file was reached before the requested frames were read completely

查看:108
本文介绍了在Matlab中读取电影文件:在完全读取请求的帧之前,已到达文件末尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用mmreader()读取具有.avi扩展名的电影文件,它播放电影但有以下警告提示:

I am trying to read a movie file with .avi extension using mmreader(), it plays the movie but a following warning apperas:

在完全读取请求的帧之前,已到达文件末尾.返回了第1帧到第456帧.

请帮助我...

推荐答案

如果您不发布相关代码,将很难为您提供帮助,但我怀疑问题出在您向mmreader的第二次输入.第二个输入用于指定要读取的帧,如果指定的帧数超过电影文件的帧数,则会收到该警告.

If you don't post the relevant code it is difficult to help you, but I suspect that the problem is with your second input to mmreader. The second input is for specifying what frames to read, and if you specify more frames than the movie file has, you will get that warning.

从文档中:

例如,给定一个带有2825的文件 与多媒体相关的框架 对象obj,调用读取帧2800 -3000如下:

For example, given a file with 2825 frames associated with the multimedia object obj, a call to read frames 2800 - 3000 as follows:

images = read(obj, [2800 3000]);

返回:

警告:已到达文件末尾 在读取请求的帧之前 完全地.框架2800至2825 被退回了.

Warning: The end of file was reached before the requested frames were read completely. Frames 2800 through 2825 were returned.

我建议您将第二个输入调整为mmreader或忽略警告,因为它不会影响电影.

I suggest that you either adjust your second input to mmreader or just ignore the warning, since it shouldn't effect the movie.

这篇关于在Matlab中读取电影文件:在完全读取请求的帧之前,已到达文件末尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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