元数据,视频长度无需加载图像数据 [英] metadata, video length without loading the image data

查看:82
本文介绍了元数据,视频长度无需加载图像数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好:

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

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. 


这篇关于元数据,视频长度无需加载图像数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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