Create High Quality Flash Videos in Ubuntu
I recently got a nice new camera that can shoot HDTV videos, and the only way to show off the awesome quality to the world is by creating flash videos by myself. Here is an example:
I use Ubuntu, so this tutorial won’t work on Windows. I have encoded the video into the H.264 format, left the original resolution at 848 x 480, and the framerate at 30 Hz. I use constant quality setting because then the video look very good even when the camera moves quickly, and it uses less bitrate when not needed. The disadvantage is that the required bitrate is uneven, so make sure youre buffer is large enough before you start playing.
Here is how to do this:
- Encode your video with mencoder (click to install). It has to be x264 for video (0 or 1 bframes), and faac for audio.
- Convert the result into an mp4 using mp4creator (click to install), as described here.
- Now you have an mp4 file that can be played with JW player. Download it, have a look at the readme.html, and follow the example described there.
- The player requires 20 pixels in height, so add this to the SWFObject creation.
I have written a small ruby script to convert any movie to a MP4 file. The first parameter is the input file, second parameter is the framerate. Save this file as e.g. convert2mp4.rb.
Read more