In February 1999 I bought a digital camera, a Sony MVC-FD81. It uses
normal floppy disks for storage, something I have found very
convenient. Even better, it can record short video sequences!
Quite soon I found an irritating problem with the camera. With an analog camera it is common to rotate the camera in order to get a picture in portrait format rather than landscape. Naturally this works just as well with digital photos, but it is much less convenient to rotate a computer monitor than it is to rotate a piece of photo paper.
For pictures the problem is minor, as there are hundreds of programs that can rotate JPEG images. For video I haven't found a single program able to rotate an MPEG video sequence!
Thanks to Sun's Java media framework this has changed. I have written a Java application (included with full source code here) that uses the media framework to read an MPEG video, rotate all frames 90 degrees clockwise and save the video sequence back to disk.
The video rotator requires Sun's JMF 2.0. I haven't found a codec for writing MPEG, but Apple's QuickTime format works well. The QuickTime files must probably be installed in order to do that. They are available on the Internet.
Two Windows BAT-files are included that illustrates how the application can be used. The rotator should work on other platforms as well (it is pure Java), but I can make no such guarantees.
Note! The original video rotator worked well with the beta version of JMF 2.0, but Sun decided to make some changes. An updated version for JMF 2.1 is available here. Unfortunately the QuickTime codec no longer works. If you have the time, feel free to download the code and play around with it. If you find a codec that works, let me know...