What data does AVAssetWriter metadata expect?
Asked Answered
H

0

7

I am trying to add metadata to a video I am transcoding via AVAssetWriter. I tried creating AVMutableMetadataItem object, inserting it in an array and setting metadata property of the AVAssetWriter object. The result file does not include the metadata provided.

MediaInfo:

 AVMutableMetadataItem *mutableItem = [AVMutableMetadataItem metadataItem];
 mutableItem.keySpace = AVMetadataKeySpaceQuickTimeUserData;
 mutableItem.key = AVMetadataQuickTimeUserDataKeyCredits;
 mutableItem.value = @"credit to me";

 assetWriter.metadata = [NSArray arrayWithObject:mutableItem];

Please help Thanks

Hatpin answered 10/4, 2012 at 15:48 Comment(1)
The docs say you should set the metadata before calling startWriting, I assume you're doing that. Maybe not all keys are supported: #5778109Nonanonage

© 2022 - 2024 — McMap. All rights reserved.