且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Matlab中读取电影文件:在完全读取请求的帧之前,已到达文件末尾

更新时间:2023-11-12 15:25:16

如果您不发布相关代码,将很难为您提供帮助,但我怀疑问题出在您向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.