Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

1.4. Final Encoding the public versions

The final video is (re)compressed. The clips now have the smallest possible size, ready for distribution as "public" versions.

Windows Media Encoder

This is our main method for distribution. The WMV Screen Codec supports very high compression, at lossless quality. Input can be an AVI File or a previously captured WMV file. The following settings need to be done, to produce perfect Screen Capture Vids:

  • Audio: Windows Media Audio Voice, choose 12 kBit/s, 16kHz, mono

  • Video:  Windows Media Video Screen, choose ~10 fps (the encoder has variable frame rate, so it will determine the necessary fps by itself), ~300 kBit/s (the encoder supports variable bitrate. This is only the maximum bitrate, used, if there is a lot of stuff going on on screen. The final bitrate will be ~20 kBit/s.

  • Do not scale the image (use 'Same as video input'). Scaling the image will result in higher bandwidth usage, because scaling artifacts and blurring will have to be compressed

  • You can use time compression, to change the speed of the movie of the final video. Be careful with these settings – your audience might not be able to follow the film. Users of Windows Media Player can adjust the playback speed of the video, while watching the video, so applying time compression now, does not make much sense – but it is a nice feature to experiment with.

  • Don't forget to mention the language for that profile.

  • Save the profile, giving it a name, that includes info about the language used. You can take this profile later, for batch encoding, using the command line utils, which are described later in that document.

  • Its important to activate 'Index file' at the Output Pad. This makes seeking positions, while playing back the videos.

Adding Tags to WMV Files

Media Encoder ships with 3 important utils to manipulate the videos afterward. Using 'Windows Media File Editor', we can  add Copyright, Author etc. information to videos, that are displayed while playback. This is like ID3 tags for mp3s. It is possible to import and export the TAG info as XML files.

Muxing language streams in one WMV file

Using 'Windows Media Stream Editor', muxing and demuxing video and audio streams is possible. I wont go into a detailed description here, the process is described in the help file, that you can access.

Creating OGM Files

For our Mac/Linux/BSD/BeOS users (and also for users of Windows, who prefer open source technology) we have to offer an alternative Format. We use ffmpeg (ffvfw) for video, vorbis for audio, ogm as the container. Get the necessary software here:

Maybe you've heard of Ogg Vorbis, or Ogg before. First let's get the terms straight because there is quite a bit of confusion in that area and until the day I wrote this document I was confused about the terms myself. So here goes: Xiph.org is the home of a collection of open source Internet multimedia tools, among other things the Ogg Vorbis audio codec and Ogg Tarkin (a video compression codec, still in the planning phase). Ogg Vorbis is an open source patent free audio codec that can rival the quality of upcoming commercial codecs like AAC, MP3Pro and VQF and which can surpass MP3 and WMA audio.

The Ogg project also loosely defines a media stream that will incorporate Ogg Vorbis and Ogg Tarkin. Just recently a first implementation of that format has been released. It is now possible to have any kind of DivX or XviD video (in fact I used an XviD video to test this guide) and Ogg Vorbis audio tracks. It would also be possible to use MP3 tracks in an Ogg media stream. Ogg audio can achieve great quality at lower bit rates than MP3 which means you'll have more space for the video. [taken from www.doom9.org]

Our source material has to be an avi file and a wav audio stream. We will create the ffmpeg encoded video stream first. Start Virtual Dub mod and open the avi.

Go to Video->Compression and choose ffvfw MPEG-4 codec. Press configure. Choose  '1 Pass -quality', 80%. The rest of the settings should be at the default values. Of course you are free, to install the alpha version of ffmpeg and experiment with the settings. 2-pass encoding, b-frames, quarterpel, enhanced motion estimation (in short the mp4 advanced simple profile features) can result in higher quality! Check www.doom9.net for more information. Hit 'ok'. Check if Video->Full processing mode is active.

Go to Video->'Framerate'. Here we can convert the frame rate. 5 fps is a good maximum value. If your source material has less than 5fps, leave the frame rate as it is.

Check out Streams->Streamlist, that no audio stream is activated, cause we just want to convert the video.

Hit File->Save As. Choose AVI for output and give it a filename. Click Save and the encoding process should start – wait. ;) Play the avi in your favorite player, to check its quality and size. It should not have > 100kBit/s.

Fire up OggMux by simply double-clicking the OggMux binary. Now hit the "..." button next to the "movie" box, this will allow you to select your avi file which you want to multiplex. In the title box, just write whatever title your movie has.After that, go down to the soundtrack box and hit the "..." button. You now can select your ogg (vorbis) soundfile which you want to add. Next select the appropriate language which should be assigned to that soundtrack. If you have a .wav which you want to encode while multiplexing the files, change the file type of the file open dialog which pops up and select "wave file", after that set the correct language. When you encode wav files while multiplexing, set the quality of the vorbis encoding to .1 represents quality 0.01, 1000 represents quality 10 - you most likely want to encode using quality 0.01 though. When you're done with the correct setup for that soundtrack, hit the "add" button, the file should show up in the list field now. Repeat this with all soundtracks you want to add.If you did something wrong, just click on the entry in the list and edit the boxes (e.g. change the language), when you're done with that, hit the "modify" button. If you want to get rid of an entry, select it and hit "delete".Now it's time to select your output file by hitting the "..." button next to the target-field. Just select the directory and modify the filename as you like. ".ogm" is added automatically if you don't specify another suffix for the file. Last, but not least you can setup the split size for the files. Up to now, this isn't key frame accurate and thus may result in files which begin with a few frames/seconds of a "still picture". Note that splitting doesn't work if you're encoding a wave file while multiplexing!Now you're done with setting up OggMux. Hit the "Mux!" button and enjoy the show!

After that, you can open the file using your favorite player or Virtualdubmod to check quality and audio streams.