GitXplorerGitXplorer
u

MP4Audio

public
34 stars
7 forks
0 issues

Commits

List of commits on branch master.
Unverified
78a7109910da6d455e1a0394f8aca0ae8e1bed3b

added disclaimer to readme

uunixpickle committed 10 years ago
Unverified
3f5cb6c17d67a049c74b86bcc39648a37d4b9eb6

use canonical flag instead of unit canonical

uunixpickle committed 12 years ago
Unverified
338b2f8c94f99addbcecc348a275ddf9154c9cfd

Fixed compilation issues on iOS

uunixpickle committed 12 years ago
Unverified
f209aa62a0498967308f2e8b93f5db3e4ed86936

updated usage and change main.m

uunixpickle committed 12 years ago
Unverified
e9c4e71085dca2217d9704f8b51475c89682a4d7

No need for those pesky iTunes tags

uunixpickle committed 12 years ago
Unverified
6cf314e8636439c19244dd6faa54b4ab999d742e

added everything

uunixpickle committed 12 years ago

README

The README file for this repository.

Disclaimer

I have not worked on this project in a long time, and I never tested it on a wide variety of audio files. If you are having problems using it, I would highly recommend looking for a different library.

With that said, if you find a bug and figure out how to fix it, I will be willing to accept a pull request.

MP4Audio

This nifty Objective-C library makes it super easy to extract the AAC audio track from an MP4 file and export it as an M4A file. In addition, MP4Audio provides a ridiculously simple interface for setting the metadata of an M4A file (i.e. artist, album, etc.). There's never been a simpler way to do these tasks from Objective-C!

Usage

Convert a video file to audio:

ANMovie * movie = [[ANMovie alloc] initWithFile:@"test.mp4"];
[movie exportAACToFile:@"test.m4a"];
[movie close];

Set the metadata for an audio file:

NSData * jpegCover = ...;
ANMetadata * metadata = [[ANMetadata alloc] init];
metadata.title = @"Developers (feat. Steve Balmer)";
metadata.album = @"Greatest Hits";
metadata.year = @"2012";
metadata.artist = @"Alex Nichol (feat. Steve Balmer)";
metadata.trackNumber = [[ANMetadataTrack alloc] initWithTrackNumber:5 tracks:12];
metadata.albumCover = [[ANMetadataImage alloc] initWithImageData:jpegCover type:ANMetadataImageTypeJPG];
movie = [[ANMovie alloc] initWithFile:@"test.m4a"];
[movie setMovieMetadata:metadata];
[movie close];