tags:

views:

190

answers:

4

I would like to find a FREE MP4 (container) writer for Java. I do not need an encoder, only something which can write the correct atoms given their expected values. Bonus for such a library that also can write "valid" F4V.
I would prefer a pure Java solution rather than something using JNI or external executables.

A: 

The Java I've seen which modifies MP4 files would invoke Nero AAC Codec externally (a Windows native .exe which Nero does not supply the source for) to modify AAC files (which are Apples audio-only MP4 files). It works for audio only, not to video.

Chadwick
+1  A: 

Can't vouch for it, but red5 is an open source flash server written in Java, which claims support for streaming mp4 and has implementations of mp4 IO objects which may be able to create said format.

Also, IBM created their Toolkit For MPEG-4 a while back and though it's not free, it might help.

Chadwick
Funny that you mention Red5, I'm a core dev on the project :). And yes, I know about IBM's implementation but it, as you verify is not FREE.
Mondain
Hah! After seeing the mp4 impl classes in red5 I was considering using it for an old abandoned project. Can it not create mp4 output, or are you simply looking for anothere implementation to compare to?
Chadwick
The mp4 code in red5 is just a reader, but the server is perfectly capable of streaming live or recorded mp4 content. It just can't write it to disk.
Mondain
+1  A: 

FFMPEG's java bindings? http://fobs.sourceforge.net/f4jmf_first.html

Or simpler a JNA proxy over some C++ MP4 library.

Daniel Voina
I need a solution that does not use JNI or JNA bindings, it cannot rely upon "native" code.
Mondain
+2  A: 

May be you are looking for something like StreamBaby.

Joe
I see they have code for a splitter and interleave writer in java, but they are using FFMpeg. The writer does not look complete but its a start.
Mondain