元数据,视频长度无需加载图像数据

元数据,视频长度无需加载图像数据

问题描述:

您好:

有没有办法在不加载图片数据的情况下检索元数据,视频长度等? 我发现如果我不需要图像数据,使用以下内容可能非常耗时。

Is there a way to retrieve metadata, video length etc without loading the image data?  I found that using the following can be time consuming if I am not in need of image data.

MediaItem mediaItem = new MediaItem(videoFile);

MediaItem mediaItem = new MediaItem(videoFile);

谢谢

对不起,暂时不行。主要原因是许多格式在其标题中没有正确的信息并要求我们解析文件(甚至创建图形以在某些情况下获得第一帧)以获得正确的帧大小,
持续时间等 

Sorry, not at the moment. The main reason is that a lot of formats don't have the correct information within their header and require us to parse the file (and even create a graph to get the first frame in some cases) to get the correct frame size, duration, etc.