本文介绍了在 Powershell 中使用 TagLib 读取 id3v2 帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 TagLib# 库读取文件的 id3v2 标签信息电源外壳.读取标准标签属性不是问题(艺术家、标题等),但我很难弄清楚如何读取 ID3v2 帧(特别是 COMMENT).

I'm trying to read a file's id3v2 tag information using the TagLib# library with Powershell.Reading the standard tag properties is not a problem (artist, title etc.), but I'm having difficulty figuring out how to read the ID3v2 frames (specifically the COMMENT).

谁能提供一个简单的例子来说明如何做到这一点?这方面的文档似乎很少.

Can anyone provide a simple example as to how to accomplish this?Documentation on this is scarce it seems.

推荐答案

想通了.

这就是我想要完成的:

# load the TagLib# assembly into PowerShell
[Reflection.Assembly]::LoadFrom("C:\taglib-sharp.dll")

$media = [TagLib.MPEG.File]::Create("C:\1812 Overture.mp3")
[TagLib.Id3v2.Tag] $currId3v2 = $media.GetTag([TagLib.TagTypes]::Id3v2)

$commentFrames = $currId3v2.GetFrames("COMM")
...

对不起,如果我描述的不够充分.

Sorry if I was not descriptive enough.

感谢您愿意提供帮助.

这篇关于在 Powershell 中使用 TagLib 读取 id3v2 帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-16 17:38