It seems the problem was with Audacity for the Mac, it was losing my metadata. I exported it on Windows Audacity to m4a can copied the file across and can now find my Artist
Losing some Metadata from Audio Files created with Audacity
-
04-04-2022 - |
Question
I have many short voice clips which I created with Audacity (windows) and exported using Audacity (Apple) in m4a format. The project was for Android originally which is why I created the clips before testing if I could get the data back . When I read the metadata with AVFoundation I lose some of my fields. specifically
- Artist Name
- Track Number
I have tried
AVAsset *asset;
asset = [AVURLAsset URLAssetWithURL:url options:nil];
for (NSString *format in [asset availableMetadataFormats]) {
for (AVMetadataItem *item in [asset metadataForFormat:format]) {
NSLog(@"Item %@ Value: %@",[item commonKey],[item value]);
With this I get values
- title maps to Audacity: Track Title
- albumnName maps to Audacity:Album Title
- software value Lavf52.6
- (null) maps to Audacity: Comments
- (null) maps to Audacity: Genre
- Another couple of null which I could not identify the data
I also tried but that gave me the non null values above
NSArray *metaDataList = [asset commonMetadata];
for (AVMetadateItem *item in metadataList)
Is there an alternate Metadata reader / or an alternative to Audacity which I could use to retrieve this data easily.
I am new to IOS and to the Apple world.
Thanks
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow