Writing QuickTime movies using pure Java
June 21st, 2008
Jeremy Woods wrote an article with some brilliant Java classes which can write QuickTime movies with JPEG encoded video frames.
I wanted to write a lossless QuickTime movie encoder for a long time, so I couldn’t resist taking Jeremy’s code, and see whether it was possible to add support for PNG encoded video frames.
After tinkering with the code a bit, I decided rewriting it entirely by reusing designs I had seen in the Amiga IFF library. I also added support for large movie files (larger than 4 GB).
The QuickTimeOuputStream class is freely available as part of my CubeTwister source code.
You can download a small demo which only contains the QuickTimeOutputStream and all necessary sources here: QuickTimeDemo.jar. Running the demo will create a JPEG-encoded and a PNG-encoded QuickTime movie.
Update 2009-08-30: QuickTimeOutputStream can now also write RAW-encoded video.
June 25th, 2008 at 9:55 pm
Is it possible to use this code for an educational institution? What are the terms of your copyright license?
June 26th, 2008 at 6:17 am
Hi Melinda,
QuickTimeDemo is free for all uses (personal, educational, commercial, …). The terms of the Creative Commons Attribution 3.0 license apply:
http://creativecommons.org/licenses/by/3.0/
If you download the QuickTimeDemo.jar again, you’ll find a file named license.html inside of it, which contains these license terms as well.
With best regards,
Werner
June 26th, 2008 at 4:57 pm
Thanks, this is a great help. A problem can arise in your code in ImageDirToMovMain.test if the first file in the directory is a hidden file.
June 27th, 2008 at 6:31 am
Thanks Melinda,
I have fixed this now.
Cheers,
Werner
September 11th, 2008 at 2:50 am
According to the license—
Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
How would you like to be referenced in the work???
September 11th, 2008 at 5:57 am
@AO,
I would like licensors to keep the reference to me in the headers of my source files.
That will do.
Of course, if you do have a section in your program or accompanying documentation which mentions all software components it uses, I don’t mind being listed there.
-Werner
June 15th, 2009 at 8:51 pm
[...] writing QuickTime movies using pure Java turned out to be relatively easy, I gave today a try at an AVI encoder for PNG and Motion-JPEG [...]