Question

I am looking to strip out ID3v1, ID3v2.x tags from an .mp3 file using C#. I would rather not implement it myself - but use something tried and tested.

TagLibSharp looks really good for creating tags - but how could it be used to remove them? If there's any other library more suited to this I'd use it.

Était-ce utile?

La solution

Use the TagLibSharp RemoveTags() method.

file.RemoveTags(tagtypes);

where tagtypes is a TagType bitmask for the tags you want to remove. For Id3v1 and Id3v2, try

file.RemoveTags(TagTypes.Id3v1 && TagTypes.Id3v2);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top