A movie file contains a stream of frames. Each frame can be represented by several hundreds thousands pixels. Usually there are 25 frames per 1 second of playback, so the movie files are condemned to be very large. To reduce a movie file size, various compression algorithms are used. Most of them are called “loosy”, because a compression process may discard or modify the original frame pixels. Although the results are barely noticeable while watching a video, the loosy compression can be disadvantageous, when a movie is used as experimental stimulus. The following example shows what may happen, when a movie is compressed with a standard loosy codec. You can see compression artefacts on the on the middle image. In contrast, when lossless codec is used, the frame pixels are intact (compare the left and the right images)
Uncompressed original frame (200% crop)
Cinepac Radius codec with the standard loosy compression
ffdshow codec with the lossless compression
There are several “lossless” movie codecs available, but they are not commonly supported and, therefore, may cause different compatibility problems during a playback. One of the recent problem I met has occurred with an uncompressed movie that was being played alright in a windowed DirectX mode, while crashing in the full-screen mode. In order to avoid such issues, I will show further how to convert a custom movie into the ffdshow format, that can preserve the frame pixels intact and be seamlessly played on the most of computers.
First, you need to download a popular video converter, called VurtualDub. Check for the most recent version here and select either 32 or 64 bits version that matches your OS. There is no installer, so simply unzip the downloaded file into a new folder.
Second, you need to download the ffdshow video codec. Run an executable installer and enable the VirtualDub plugin in addition to the default components.
After both packages are installed, run VurtualDub and open your original movie there. Don’t look for the ‘Start Conversion’ button, VirtualDub will automatically convert a movie, as you choose “Save as avi..” item from the File menu. Your task is to select the output format, ffdshow for our case. Go to the ‘Video’ menu and click on the “Compression…” item. You will see a settings dialog, in which you have to select the “ffdshow Video Codec” line and then click on the ‘Configure’ button.
In the configuration dialog choose the ‘uncompressed’ encoder (ffdshow can also offer compressing options) and the desired color space. For example, the Y800 space codes movie frame in 8-bit grey. If you are not sure which color space you want, stay with the default option.
Close the configuration dialogs and save a converted movie with ‘File->Save as AVI…”. Use a different file name. Now you can load the converted movie into EventIDE. If you plan to run a movie experiment on a different computer, make sure that the ffdshow codecs is also installed there.