音频/视频文件的读取/写入的元数据 [英] Reading/Writing metadata of audio/video files

查看:1265
本文介绍了音频/视频文件的读取/写入的元数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些帮助在读/写音频/ VIDO文件的元数据inforamation。我有很多,但没有发现任何有用的东西搜索。标签库锐是一个开源库,在读/写的元数据提供帮助。使用标记库我能够编辑值的一部分而不是全部喜欢。

I need some help in reading/writing meta data inforamation of audio/vido file. I have searched alot but not find anything thing helpful. Taglib sharp is an open source library that provide help in reading/writing metadata. Using tag lib i'm able to edit some of values but not all like.

TagLib.File videoFile = TagLib.File.Create("test.mp4");
videoFile.Tag.Title = "Test";
videoFile.Tag.Comment = "Nothing";



但我无法像编辑URL作者,制片人等我如何编辑这些属性以下属性??

but i'm unable to edit following properties like Author url, producers etc. How i edit these properties ??

推荐答案

我从来没有这样做之前,对于视频文件,但我有一个MP3文件。您可以访问这样的框架:

I've never done this for video files before but I have for mp3 files. You can get access to those frames like this:

TagLib.File file = TagLib.File.Create(mp3FileName);
file.Tag.Title = "some title"; // you've got this
TagLib.Id3v2.Tag tag = (TagLib.Id3v2.Tag)file.GetTag(TagTypes.Id3v2);
tag.SetTextFrame("WOAR", "some url"); // WOAR = Official artist/performer webpage
file.Save();

您可以在维基百科查找的文本框的标识符列表:
ID3v2的框架规范(2.3版)

You can find a list of the text frame identifiers at Wikipedia: ID3v2 Frame Specification (Version 2.3)

我不知道,如果视频文件,给你同样的框架范围内的那ID3确实,虽然公告称维基百科也说(的非MP3和替代实施的)

I don't know if video files give you the same range of frames that ID3 does, though notice that Wikipedia also says (Implementation in non-mp3s and alternatives)

MP4还允许ID3的嵌入标签,这是广泛的支持。

MP4 also allows the embedding of an ID3 tag, and this is widely supported.

所以我猜想这也适用于MP4文件像你想。

So I would guess this also works for mp4 files like you're trying.

这篇关于音频/视频文件的读取/写入的元数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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