Exploring Cinepak in 2022...
I have long been fascinated with video and audio codecs and I have a suspicion that this fascination started back in the 90s when I first saw a 'dancing postage' stamp of a video while using Windows 95. Now in 2022 I realise that this was probably a Cinepak video, the codec that arguably represented one of the beginnings of video playback for both Windows and Mac computers. And so in retirement I have set myself the task of recreating just such a video, one that would still be suitable for playback on hardware from the 90s. And, Gentle Reader, I have documented my efforts for you on this page in case you also wish to look back in time a little bit with me...
Formats and sizes...
After some work I managed to get a Virtual Machine running for Windows 2000, after failing many times with earlier versions of Windows. Windows 2000 Windows Media Windows Media Player 6.4.09.1125 (1992-1999) and the associated 'Help' pages recommends the following file formats:
File name extensions: .avi, .asf, .asx, .rmi, .wav, .wma, .wax Moving Pictures Experts Group (MPEG) File name extensions: .mpg, .mpeg, .m1v, .mp2, .mp3, .mpa, .mpe Musical Instrument Digital Interface (MIDI) File name extensions: .mid, .rmi Apple QuickTime®, Macintosh® AIFF Resource File name extensions: .qt, .aif, .aifc, .aiff, .mov UNIX formats File name extensions: .au, .snd
No mention of the specific codecs involved mind you but a little bit of research showed that Cinepak video and PCM audio would be fine. Cinepack files were classically 320 x 240 at 15fps ('full screen' and 'full motion' at the time) and contained in either avi or mov container. And so those are the targets for this exercise.
All the steps...
I have broken down the steps involved in creating this 'retro' Cinepak file to both make it more logical for myself and easier to follow by anyone following in my steps. So, only few easy steps with quite a bit of explanatory material:
Basic tools and source...
For a start a modern copy of FFmpeg is required although an older one might serve as well as FFmpeg has had both a native encoder and a native decoder for Cinepak for many years now. Also if you wish to emulate the work on this page you might like to also use the following two source files:
- Sintel trailer video : 720p uncompressed 1.7GB
- Sintel trailer audio : flac 5MB
A beautiful little trailer with enough colour, fast and slow movement and nice soundtrack to make experimentation with encoding worthwhile. And short enough so that neither the input files nor the encoding process itself should completely ravage your hard drive!
Resize...
So first step is a simple resize to bring the output file down to our target size. A beginning is this simple command line:
ffmpeg -i sintel_trailer_2k_720p24.y4m -i sintel_trailer-audio.flac \ -c:v cinepak -q:v 1 -g 100 \ -vf "scale=320:-1:flags=lanczos,fps=15" \ -c:a pcm_u8 -ar 22050 -ac 1 \ first_run.mov
I have selected a 'quality' setting for the output video which gives an eventual average bitrate of about 1,649 kb/s which I confess is only really just acceptable when viewing the video. And eagle eyed FFmpeg users will realise that that my source video is actually 16:9 ratio, 320x180 when resized, and I am actually after 320 x 240 which is of course 4:3 ratio!
Padding...
The simple choice is to either crop or pad and I have chosen pad; there are many variations of both of these options but for this project I have decided to keep things simple. With the following the resize is changed a little, with the same outcome, but black padding is added to a central video image:
ffmpeg -i sintel_trailer_2k_720p24.y4m -i sintel_trailer-audio.flac \ -c:v cinepak -q:v 1 -g 100 \ -vf "scale=320:240:flags=lanczos:force_original_aspect_ratio=decrease,\ pad=320:240:-1:-1:color=black,fps=15" \ -c:a pcm_u8 -ar 22050 -ac 1 \ second_run.mov
I confess, Gentle Reader, that I am not sure that my filter chain is in a completely optimised order but the outcome file is the required size and viewable at the very least on modern hardware.
Metatags...
When I cranked up Windows Media Player 6.4.09.1125 I saw that the main display showed three values which I presumed were reading from the file's metatags: Clip, Author and Copyright. My final attempt to add these fields is as follows, and this is the final and complete FFmpeg command line:
ffmpeg -i sintel_trailer_2k_720p24.y4m -i sintel_trailer-audio.flac \ -metadata Title="Sintel Trailer" \ -metadata Artist="Blender Foundation" \ -metadata Copyright="Attribution 3.0 Unported (CC BY 3.0)" \ -c:v cinepak -q:v 1 -g 100 \ -vf "scale=320:240:flags=lanczos:force_original_aspect_ratio=decrease,\ pad=320:240:-1:-1:color=black,fps=15" \ -c:a pcm_u8 -ar 22050 -ac 1 \ third_run.mov
Exasperatingly enough 'Clip' and 'Copyright' show up in the Windows Media Player main display but 'Author' has stubbornly refused to appear despite me investing some considerable time investigating the issue. Perhaps, Gentle Reader, you have some insight into this? Let me know...
Final results...
Playback was pretty good on my Windows 2000 VM although I noticed that it was not a good idea to resize or move the Media Player Window at all and I have not investigated this limitation. An image of the final result playback can be seen here... My remaining gift to you, Gentle Reader, is to provide a full version of the wonderful Sintel movie, converted it to Cinepak and ready perhaps for playback on your Windows 2000 VM. Download can be found here...
And in conclusion...
I have had an absolute blast experimenting with the Sintel trailer and an ancient copy of Windows. Please feel free to contact me with any errors of fact that you have found on this page, any errors of opinion will probably remain uncorrected. And have a great day!