PDA

View Full Version : MP4 library for embedded?


kidjan
13th August 2009, 21:37
I was wondering if anyone knew of any open source or commercial MP4 libraries that could be ported to an ARM core. Specifically, my requirements are:

1. Need to be able to write H.264 and some as-of-yet unknown audio format.
2. Need robust metadata support.
3. Need a muxer; demux isn't necessarily required, but would be nice.

I know ffmpeg has MP4 stuff, but I'd really like to get something smaller and less daunting. There's the bento4 library. surprisingly, I have yet to find any realistic commercial offerings.

Another option is for me to just get the ISO spec and bang out something. Thoughts on this option?

Any advice/comments are greatly appreciated--thanks!

Ritsuka
14th August 2009, 09:56
I think mp4v2 (http://code.google.com/p/mp4v2/) is what you want. It should be easy to compile it on arm, and it support all the itunes metadata. It also quite easy to add a new audio/video format.

Dark Shikari
14th August 2009, 12:19
libavformat itself is not very large; nobody says you have to use all of ffmpeg, and you can disable all muxers/demuxers that aren't relevant.

There's also gpac.

(I'm not clear by what you mean by "write H.264"; do you mean encode it or mux it?)

kidjan
14th August 2009, 17:49
libavformat itself is not very large; nobody says you have to use all of ffmpeg, and you can disable all muxers/demuxers that aren't relevant.

There's also gpac.

(I'm not clear by what you mean by "write H.264"; do you mean encode it or mux it?)

Sorry, I should have been more clear: I mean mux it. My embedded system has a hardware-based H.264 encoder that spits out an elementary stream. Eventually there will also be audio, but we're still working on what type of encoding we're going to use.

kidjan
14th August 2009, 18:53
I think mp4v2 (http://code.google.com/p/mp4v2/) is what you want. It should be easy to compile it on arm, and it support all the itunes metadata. It also quite easy to add a new audio/video format.

Thank you for the pointer; it looks promising. I'll evaluate the code today.

Also, it looks like the audio codec is going to be AAC or MP3 (we really wanted to go with speex....but....some problems there); and from what I can see, it'll be AAC due to licensing costs.

kidjan
21st August 2009, 02:43
MP4v2 was the kicker--about 1.2 MB compiled to the ARM, full featured, pretty easy to use. Nice metadata support, although it was a little unclear whether or not it was using unicode (it was). There are a few fairly minor internationalization problems, but all in all, it's perfect.