如何从现有文件中删除MP3标签 [英] How could you remove MP3 tags from an existing file

查看:77
本文介绍了如何从现有文件中删除MP3标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找使用C#从.mp3文件中删除ID3v1,ID3v2.x标签的功能.我宁愿自己不要实现它,而要使用经过尝试和检验的东西.

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看起来非常适合创建标签-但是如何将其删除?如果还有其他更适合于此的库,我会使用它.

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.

推荐答案

使用TagLibSharp RemoveTags()方法.

Use the TagLibSharp RemoveTags() method.

file.RemoveTags(tagtypes);

,其中tagtypes是要删除的标签的TagType位掩码.对于Id3v1和Id3v2,请尝试

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

file.RemoveTags(TagTypes.Id3v1 && TagTypes.Id3v2);

这篇关于如何从现有文件中删除MP3标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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