4
votes

Is there any way to set metadata like artist, title, genre etc. for an AAC file recorded with AVAudioRecorder?

For MP3 files there is the ID3 tag. However, I haven't been able to find an equivalent for AAC files. I have searched through the Apple Developer Docs without success but there must be some way to set those attributes because when playing an AAC file downloaded from iTunes in an audio player like VLC or foobar2000 it does recognize the metadata and even the album art.

(For recording the AAC files I use the code from Apple's Multimedia Programming Guide.)

1
Do you mean a naked AAC packet stream or AAC in m4a?Rhythmic Fistman
Currently I am only using plain AAC but if there is a way to put that AAC file in an m4a container and write the metadata to that file I'll be fine with that.Mischa
I don't think plain AAC supports metadata, you'll probably have to switch to m4a.Rhythmic Fistman
If you're using kAudioFormatMPEG4AAC and set the file extension to .m4a it should work.Rhythmic Fistman

1 Answers

0
votes

I don't think you can add metadata to your audio file when using AVAudioRecorder. I think you will have to use an extra AVAssetExportSession pass to do that, like is done in this question