I already capture video via phone's camera with AVCaptureMovieFileOutput
Object,
I want to add new meta data into file,
I try to use AVAssetExportSession
to do it, it works !
BUT it cost a lot of time, I guess, this method has re-encode the file,
I just want to add new meta(Location),
I try to use setMetadata
method in AVCaptureMovieFileOutput
But I have no idea about how to do so,
I try
meta :
AVMutableMetadataItem *newItem = [AVMutableMetadataItem metadataItem];
newItem.identifier = [AVMutableMetadataItem identifierForKey:AVMetadataQuickTimeMetadataKeyLocationISO6709 keySpace:AVMetadataKeySpaceCommon];
newItem.key = AVMetadataQuickTimeMetadataKeyLocationISO6709;
newItem.value = [self gpsStringForVideo:gps];
first:
[_movieFileOutput setMetadata:@[meta]];
[_movieFileOutput startRecordingToOutputFileURL:outPutUrL recordingDelegate:self];
But I can't get delegate's response.
then:
[_movieFileOutput startRecordingToOutputFileURL:outPutUrL recordingDelegate:self];
[_movieFileOutput setMetadata:@[meta]];
I can start record normally, but output file does not contain any information!
Anyone have any suggestion? Thanks!