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

  1. Artist Name
  2. 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

  1. title maps to Audacity: Track Title
  2. albumnName maps to Audacity:Album Title
  3. software value Lavf52.6
  4. (null) maps to Audacity: Comments
  5. (null) maps to Audacity: Genre
  6. 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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top