如何使用Objective-c从视频电影文件获取元数据? [英] How to get metadata from video-movie file using Objective-c?

查看:455
本文介绍了如何使用Objective-c从视频电影文件获取元数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何帮助?

推荐答案

几乎可以完全使用Spotlight的元数据。

You can do this almost entirely using Spotlight's metadata.

例如,我在我的某个应用程序中执行以下操作

For example, I do the following in one of my apps

MDItemRef fileMetadata=MDItemCreate(NULL,(CFStringRef)eachPath);
NSDictionary *metadataDictionary = (NSDictionary*)MDItemCopyAttributes (fileMetadata,
                                                                                           (CFArrayRef)[NSArray arrayWithObjects:(id)kMDItemPixelHeight,(id)kMDItemPixelWidth,nil]);

这段代码基本上要求一个电影文件的像素宽度和高度的高清电影的原因)。

This code essentially asks for the pixel width and height for a movie file (to determine if it's the dimension of an HD movie or not is the reason).

Spotlight元数据属性参考按类别列出了各种文件类型的所有可用键。如果您正在检查的媒体类型包含Spotlight插件,则您可以以这种方式获取所需的数据,而无需做任何重要的操作。

The Spotlight Metadata Attributes Reference lists all the available keys for various file types by category. You can probably get the required data this way without doing anything significant, provided that the media type you're examining has a Spotlight plug-in.

这篇关于如何使用Objective-c从视频电影文件获取元数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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