If you've been following my site at all, or just browsing through, you'll see that I've tried to make this site friendly for older computers, specifically older Macintosh models such as my Centris 650 or LC475.
So far I've managed to optimize images and I've built a podcast system to listen to my favourite channels but what about video?
Well truth be told I did some digging into this I think two summers ago and just left it. Today I wanted to try adding a video to this site and yoinked up my old script again. Thought you might want to see how I did it.
What you need!
Macintosh computers using Quicktime can use a video format called Cinepak which was released around 1991 and was used also for videos on Sega Saturn systems. Because of it's low complexity it is a suitable format for our lowly 68K processors.
To transcode a video from say an MP4 to cinepak (which uses the .mov container) I used ffmpeg on my Xubuntu based laptop to encode the file. To get this, you can enter the magic incantation here:
sudo apt-get install ffmpeg
I found a couple resources to help me get the correct settings down. Rob Braun's excellent website had some tinkering information on it. And I also found this thread over at videohelp.com.
In the end I built my own script and I gotta say it does a pretty admirable job for getting video at 320p resolution on my old mac.
#$1 is file name to transcode
#$2 is the output title
ffmpeg -threads 0 -hide_banner -v 32 -stats -y -i $filename -vf $vproc -c:v cinepak -q:v $vq -af $aproc -c:a pcm_s8 -f mov "$2.mov"
Because of it's low complexity, the output file sizes are quite large actually for our test video of 40seconds, I processed my iphone's video through Handbrake to make a 720p version.
At 1280x720 my file size is: 18MB
Using Cinepak scaled down to 320x180 is: 6.7MB
Putting it on the Web
To make a page friendly for both modern and elderly computers, you can count on older browsers to safely ignore HTML tags they don't recognize.
As such we can dump the following code on a page that will either embed the high quality video on a modern browser, or provide a link to the cinepak video if we choose to click on it on an older computer.