简体   繁体   English

使用 AVExportSession 重写 mp3 文件的 ID3 标签

[英]Using AVExportSession to rewrite ID3 tags of mp3 file

I'm attempting to rewrite the ID3 tags of mp3 files in the Documents folder of my app.我正在尝试在我的应用程序的 Documents 文件夹中重写 mp3 文件的 ID3 标签。 Surprisingly it seems that Apple has little to no prewritten code for writing metadata.令人惊讶的是,Apple 似乎几乎没有用于编写元数据的预编写代码。 It appears the AVExportSession could be a viable route, albeit a circuitous one...it would basically involve reading the data from the existing mp3 and writing it to a new mp3 file with the updated metadata, though it seems like there should be an easier way to do this.看起来 AVExportSession 可能是一条可行的路线,虽然是一条迂回路线……它基本上涉及从现有 mp3 读取数据并将其写入具有更新元数据的新 mp3 文件,尽管看起来应该更容易方法来做到这一点。 Any help with this process or suggestions as to an easier method will be greatly appreciated.对于此过程的任何帮助或有关更简单方法的建议将不胜感激。

Have you had a look at the AVMetaDataItem class?看过 AVMetaDataItem class 吗? According to the documentation , this is used to set Metadata for AVAssets.根据文档,这用于为 AVAssets 设置元数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM