Search code examples
c#.net-4.0mp3id3

How to read audio (mp3) tags (Duration and Subtitle), when I use TagLib?


I am using TagLib (UltraID3Lib couldn't read every MP3 file). Maybe TagLib will do. And I couldn't find properties like Subtitle or Duration or Time?

How do I find this kind of tags?

Example: "Ondertitel" means Subtitle

enter image description here The second question is: And how can I find the tag Subtitle by using TagLib?


Solution

  • This way, you can get the duration:

    var file = TagLib.File.Create(@"xyz.mp3");
    
    Console.WriteLine(file.Properties.Duration);