Questions tagged [avmetadataitem]

An AVMetadataItem object represents an item of metadata associated with an audiovisual asset or with one of its tracks. To create metadata items for your own assets, you use the mutable subclass, AVMutableMetadataItem.

From the iOS Developer Library:

An AVMetadataItem object represents an item of metadata associated with an audiovisual asset or with one of its tracks. To create metadata items for your own assets, you use the mutable subclass, AVMutableMetadataItem.

Metadata items have keys that accord with the specification of the container format from which they’re drawn. Full details of the metadata formats, metadata keys, and metadata key spaces supported by AV Foundation are available among the defines in AVMetadataFormat.h.

You can load values of a metadata item “lazily” using the methods from the AVAsynchronousKeyValueLoading protocol (see “Asynchronous Loading”). The AVAsset class and other classes in turn provide their metadata lazily so that you can obtain objects from those arrays without incurring overhead for items you don’t ultimately inspect.

You can filter arrays of metadata items using the methods of this class. For example, you can filter by key and key space, by locale, and by preferred language.

30 questions
1
vote
1 answer

How to write AVMetaDateItem to a file and accessing it later?

I wrought this function to trim a specific part of an audio file. In the function, I'm writing to the new file two AVMetadataItems. I was trying to access these items later by rapping the URL with AvURlAsset and then accessing the AVAsset metaData…
1
vote
1 answer

use AVMetadataItem.value to get media title in swift

I want to get the media title through AVMetadataItem class /* provides the value of the metadata item */ @NSCopying public var value: protocol? { get } Above is Apple official illustrate about value…
lious_li
  • 31
  • 5
1
vote
1 answer

How to extract audio from recorded video file

Hello i am working on extract only audio from video file. That is working in < iOS 8.0 version, but it is not working in >= iOS 8.0 version. how to extract audio in >= iOS 8.0 version ?
1
vote
0 answers

AVAssetExportSession export mp3 while keeping metadata

How do I export a mp3 using AVAssetExportSession while keeping the id3 tags? Is it possible to edit the id3 tags before exporting them? This code does write the AVAsset (myMp3Asset) to file but the there are no id3 tag in the resulting mp3. //…
Bilal Syed Hussain
  • 8,664
  • 11
  • 38
  • 44
1
vote
1 answer

AVAssetExportSession not exporting metadata

I'm trying to use AVAssetExportSession to change the metadata of the file but any metadata I try to use doesn't seem to work. When I pass an empty array to [AVAssetExportSession setMetadata:Array]; the file gets written with its unedited metadata…
1
vote
1 answer

How to add NSArray in a video with AVMutableMetadataItem?

I am trying to save video with custom NSArray metadata relevant for my app and trying to retrieve it when the user selects that video from the library. I'm using the AVAssetExportSession function to add metadata. I used the sample code…
mdg
  • 39
  • 1
  • 5
1
vote
3 answers

Avmetadataitem Getting the trackNumber from an iTunes or ID3 metadata on iOS

I'm trying to get the trackNumber of a aac, mp3 or mp4 file. It's not in the commonMetadata so I started to spelunk in the other metadata keys. I found something that looks like it, but I'm yet unable to read it, and make sense of it. Even the raw…
Cyril Godefroy
  • 1,400
  • 12
  • 15
0
votes
0 answers

How do I convert AVMetadataItem value to NSDate or NSString?

I am trying to get the date a video was taken and populate a TextView with it in Xcode. I have chosen the video and then gotten the date from the AVMetadataItem creationDate. I can print it out as a NSLog but I want to convert it into a String or…
user1114881
  • 731
  • 1
  • 12
  • 25
0
votes
1 answer

How can I check if AVMetadataItem items like Title, Artist, etc , are null or don't exist?

I am building a music app and I am trying to get the MP3 files metadata with this piece of code: for (NSString *format in [assest availableMetadataFormats]) { for (AVMetadataItem *item in [assest metadataForFormat:format]) { if…
user8914795
0
votes
2 answers

Convert AVMetadataItem's GPS string into a CLLocation

An AVAsset (or AVURLAsset) contains AVMetadataItems in an array, of which one may be of the common key AVMetadataCommonKeyLocation. The value of that item is a string which appears in a format like: +39.9410-075.2040+007.371/ How do you convert…
Danny
  • 397
  • 3
  • 9
0
votes
1 answer

Objective C transformedMetadataObjectForMetadataObject make unstable size when i use it to resize preview layer

Issue is unstable (size jump between two sizes at every update) size returned by transformedMetadataObjectForMetadataObject only if i use it to resize previewLayer. for(AVMetadataObject *metadataObject in metadataObjects) { …
DiPi
  • 1
  • 1
0
votes
1 answer

Display UIView on scaled CGRect iOS

I am using the AVMetaData API to extract the bounds of an AVMetadataFaceObject. When printed to the console, this CGRect has the following values: bounds={0.2,0.3 0.4x0.5}. I'm having a fair amount of trouble mapping this to a UIView that displays…
Alex Wulff
  • 2,039
  • 3
  • 18
  • 29
0
votes
1 answer

ISRC Code from AVMetadataItem objective c

I want to get the ISRC code for Local itunes songs. I can get the metaData by the following codes: MPMusicPlayerController *mp= mp = [MPMusicPlayerController applicationMusicPlayer]; NSURL *assetURL = [mp.nowPlayingItem…
0
votes
0 answers

Detection qr code bounds IOS 7

I have qr reader with new ios 7. I need detect where is the code on the screen (corners). I use AVMetadataObject to it. Have you got any idea, how to detect it? - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputMetadataObjects:(NSArray…
Unmerciful
  • 1,325
  • 4
  • 21
  • 38
0
votes
2 answers

Running the project by build is not working in MAC OSX 10.7

-(void)artworkImages{ NSArray *noOfSongs = [mySongsArray content]; for (int i=0; i<[noOfSongs count]; i++) { NSDictionary *dic = [[NSDictionary alloc] init]; dic = [[mySongsArray arrangedObjects] objectAtIndex:i]; NSURL *url = [NSURL…
ADJ
  • 1,531
  • 1
  • 11
  • 15
1
2