Creating accessible multimedia for the web
Introduction
Encoding videos for the web can be a complicated process, this quick and dirty guide for Windows users aims to fast track authors through the process. In doing so a lot of aspects will be bypassed, thus this is far from an exhaustive explanation of the process.
Links to required software:
- VirtualDubMod 1.5.4.1 Install by unzipping to an appropriate folder.
- XviD binary open source MPEG-4 compliant video compressor binary. Install by double clicking the exe.
- Vorbis tools, OggEnc open source audio compressor binary. Install by unzipping to an appropriate folder.
Assumed present:
- MS MediaPlayer
- An un/lossless-compressed AVI audio/video source file
Creating the media
Separating the audio and video
AVI files usually contain both audio and video multiplexed into one file. We need to process the audio seperately, so we start by extracting the audio:
- Load the source AVI file into VirtualDubMod
- Select: Streams, Stream list, select the wanted audio stream (if there's more than one), Save WAV, give the file a name and save it
Compressing the audio with Ogg Vorbis
- Move the extracted audio file to the folder with the OggEnc.exe compressor in it
- Open a DOS window and navigate to that dir
- Compress the audio file with oggenc.exe using CBR (Constant Bit Rate) and a suitable bitrate. Examples; for Mono music: oggenc -b48 -m48 -M48 myaudio.wav, for Stereo music: oggenc -b96 -m96 -M96 myaudio.wav (parameter case matters!). A lower bitrate can be used if quality is not important or if the audio is mainly dialogue.
Compressing the video and adding the compressed audio
- Open the AVI video file in VirtualDubMod
- Select: Video, Full processing mode
- Select: Video, Compression, XviD MPEG-4 Codec, Configure, 1 Pass CBR and select an appropriate bitrate for your target audience (allow for approx 20% headroom for the audio stream). Rough guide:
- 30 kbps : 56k/Single channel ISDN
- 90 kbps : Dual channel ISDN
- 250 kbps : Consumer broadband
- 500 kbps : High end broadband/Intranet
- Select: Streams, Stream list, Add, select the compressed Ogg Vorbis file created earlier, select it in the left pane and press Move up so that it's on top of the list, select the original AVI WAV and press Disable
- Select: File, Save as, save as type: Ogg Media File (*.ogm), provide a filename and press save
Playing the video
Users will also need to go through this procedure, it's therefore advisable to include a link to a "help page" link on the page with the video with instructions on how to get it to work.
[To be added]
Audio/video synchronisation
If the video and audio are out of sync then you can correct that by selecting: Streams, Stream list, right click the Ogg Vorbis stream, select Interleaving, Audio skew correction.