문제

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.

도움이 되었습니까?

해결책 2

Figured it out.

This is what I was trying to accomplish:

# 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.

And thanks for the willingness to help.

다른 팁

This seems to work for me - could you please clarify your question with what isn't working?

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

# grab the MP3 file with TagLib
$file = [TagLib.File]::Create("C:\overture.mp3")

# read the COMMENT tag field
$file.Tag.Comment

For me at least, this output the following line:

Amazon.com Song ID: 123456789
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top