The Sofdec Encoding Wizard
To play back a video with Sofdec, you must first encode it as a .usm file. The Sofdec Encoding Wizard offers a very user-friendly way to do it. Located in the CRIWARE->Tools->Sofdec2 folder, this tool will lead you through the various options available through 8 simple steps.
Step 1
The first step is to select your target platform, which will allow the Encoding Wizard to preselect the most common options for it. There are two options: Standard, which will create a standard movie that can be played on any platform (e.g., consoles, handhelds), and Smartphone, optimized for playback on mobile phones.
Step 2
Once the type of target platform is chosen, it is time to select the movie to be encoded. The original recording can be in the AVI, MOV, and MP4 formats. It is also possible to provide a series of indexed bitmaps in the BMP or TGA formats. As soon as the movie is selected, its information is displayed, such as resolution, number of bits per pixel, frame rate, etc…
You must select the video codec to use to encode the movie. There are 3 choices:
- VP9: it offers the highest compression ratio and is therefore well-suited to the encoding of long movie files.
- Prime: a proprietary codec focusing on performance, it is recommended when trying to save memory or CPU cycles.
- 264: it is especially useful to increase the compression ratio without increasing the CPU load.
The interface allows you to override the resolution and frame rate of the original video. Finally, you can import a text file containing the cue point markers to embed in the video.
Step 3
It is at this point that you will be able to specify audio files for the music (it can be in 5.1 if needed) and the dialogue. In case you are planning to localize your video, it is possible to include a different audio file for each language. The audio files can be in the WAV or AIFF formats.
You will be able to choose the audio codec between two proprietary codecs from CRI Middleware:
- ADX: High-quality, low-load codec.
- HCA: High-quality, with a higher compression ratio, but using more CPU.
If you select HCA, you will be able to encode in the Ambisonics format. Finally, if the original movie already includes audio, you will have the opportunity to discard it at this stage.
Step 4
At this point, you can import a text file containing your subtitles, or more if you want subtitles to be available in different languages while playing your video.
Step 5
The next screen lets you adjust the quality settings for both image and sound. For the image compression, 3 modes are available: by defining a target bitrate, a target file size, or a compression ratio.
As for the audio quality, it can only be adjusted if you selected the HCA codec, in which case you will have the choice between 5 different modes, from the lowest to the highest quality.
Step 6
This page lets you select the output path of the encoded video, i.e. the final .usm file that can be played back by the Sofdec run-time.
Step 7
A last confirmation screen shows all your settings, before proceeding to the encoding itself. You can use the buttons at the bottom of the window to go back and forth between the different settings pages if needed. Note the Menu button provides commands to load/save all these settings.
Step 8
It is finally time for the encoding, at the end of which the .usm file you configurated will be generated, ready to be played in-game.
You can stop the encoding if you realize you made a mistake, and a preview button will open the Sofdec2 Viewer application to display the final result (more on it in a future post).
As we have seen, the Encoding Wizard makes it easy to specify all the options to encode a video into a .usm file. Sofdec also comes with a command-line version of the encoder. The executable’s name is sofdec2enc.exe, and it is located in the same folder as the Sofdec Encoding Wizard.
It is especially useful when encoding movies with options not yet supported by the wizard. For example, this is how you would encode alpha plus movies (i.e. movies that combine both alpha and additive blending).