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
May be you are looking for something like StreamBaby.
FFMPEG's java bindings? http://fobs.sourceforge.net/f4jmf_first.html
Or simpler a JNA proxy over some C++ MP4 library.
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.
You can have a look at JCodec ( http://jcodec.org ). It contains an MP4 library and MP4 demuxer and muxer.
I have implemented a QuickTimeWriter class which can write a QuickTime container in pure Java.
As far as I know, the QuickTime file format is structurally equivalent to MPEG-4 Part 14. There are only a few minor differences in the fields inside atoms/boxes.
So, with an MPEG-4 spec on your lap, and a few hours of work, you should be good.
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 Apple's audio-only MP4 files). It works for audio only, not to video.