4

I want to add some info (metadata) to a video. I have found a way to retrieve metadata, but did not find any solution to set or modify metadata. I am using AVURLAsset, AVAssetWritter also AVMutableComposition for creating the video.

OrangeDog
  • 36,653
  • 12
  • 122
  • 207
iOSPawan
  • 2,884
  • 2
  • 25
  • 50

4 Answers4

2

Use -[AVAssetWriter setMetadata:].

This is set to an NSArray of AVMutableMetadataItems. Note that you cannot set the value after writing has started.

Metadata keys and keyspaces are listed in AVMetadataFormat.h.

OrangeDog
  • 36,653
  • 12
  • 122
  • 207
1

When using AVMutableComposition, you can set the metadata property on the AVAssetExportSession when you go to write it out, rather than setting it on the asset (the composition) itself.

Ethan
  • 538
  • 5
  • 7
0

If you need to do it "off line". I've used the id3taggenerator and related tools and they work great.

Checkout more info here: http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html

Or here's a tutorial I used for adding timed metadata that's pretty good: http://jmacmullin.wordpress.com/2010/11/03/adding-meta-data-to-video-in-ios/

If you want to add meta data in-app (as in a user records a video and add's their own meta data) I'm not sure there.

GnarlyDog
  • 1,247
  • 1
  • 17
  • 24
  • 1
    Thanks, But i am looking answer for "as in a user records a video and add's their own meta data)" – iOSPawan May 24 '12 at 08:30
-2

Check out gusutils ==>

https://github.com/gpambrozio/GusUtils

There is an xcode project for creating a static library that lets you add metadata and geolocation information to your video and then persist to the assets library.

Adam Freeman
  • 1,271
  • 12
  • 20