Call of Duty 2: Create .roq intro videos

From COD Modding & Mapping Wiki
Jump to navigation Jump to search

Preparation

Testing purposes

The VLC Media Player is capable of playing RoQ videos, although please note that the video typically will not play back in VLC the exact same way as it would appear in the game, although it might help determine if the RoQ was built properly or not.


Input video

The source file you want to convert MUST meet these video requirements:

  • The video must be in AVI Format
  • The input video codec must be fully AVI compatible and not Directshow-Only (standard MSMPEG4 format)
  • Frame rate must be 30 frames per second
  • You should use a resolution of 512x512 pixels.
    Both dimensions, width and height, must be a multiple of 2, up to a maximum of 32768.


Input audio

You also have to extract the sound from the .avi as a .wav file (e.g. using VirtualDub) to include it later in .roq file.

Audio requirements:

  • 22KHz frequency
  • mono or stereo
  • 8 or 16 bits

You may use Audacity for necessary changes.

Encoding

Get the converter

Use SwitchBlade v4 for the .avi to .roq conversion - SwitchBlade


Creating CodeBooks

Run the sbcodebooks4.exe file, which will prepare the video for the next stage.

The program will ask for an input AVI file, (which it will not modify, the input source file will still be there afterwards) and then generate codebooks, which will take a while.

If all goes well so far, you should see the individual frames from the input file being displayed one by one on-screen as the program works on it.

Much like any other rendering, it can take time.


Building the RoQ visual content

Once the previous step is completed, run sbvideo4.exe to generate an actual RoQ.

This is the step where you can specify quality in bits per second to control filesize.

If the resulting RoQ needs to be re-rendered at a different quality setting, you do not have to re-generate the CodeBooks file created in the last step, you only need to go back to this stage (that you are reading right now).


Adding a Soundtrack

This last step is optional, depending on whether or not an included soundtrack is desired.

If sound is to be in the video, run sbmux4.exe and follow the prompts to combine a video-only RoQ with either a WAV or AVI file that has a soundtrack.

(If an AVI is used in this step, it should be at 16 bits, according to the SwitchBlade documentation.)


Using .roq video

When you have your .roq video done, you can change its name for example to cod_intro.roq and put it in the main/video folder (or in video folder inside your own .iwd archive). After this, when you launch the CoD 2 SP, instead of intro, you will see your movie

You can also copy, for example, movie_africa.d3dbsp from iw_02.iwd and rename it to yourmovie.d3dbsp (the d3dbsp files are all the same for videos as well as for the slideshows).

Then you make your own .gsc and .csv file (you can also make your own loadscreen which will be loaded before video) and edit them.

Find similar files in iw_07.iwd/maps, e.g. movie_africa.gsc and movie_africa.csv. Look them up to know how your own files should look like. The last thing is to put them in the right folders in your own .iwd file:

  • yourvideo.roq in /video/ folder
  • yourvideo.csv and yourvideo.gsc in /maps/ folder
  • and yourvideo.d3dbsp in /maps/ folder too.


Troubleshooting

Switchblade crashes

Switchblade v4 may crash shortly after the preview window pops up (window title: SDL_app).

This seems to happen if the input video is bad. You may try uncompressed AVI as encoding (use VirtualDubMod).

If it's still crashing, try an older version of Switchblade or use an alternative encoder (see below).


Alternative Encoder

  • Download this and unzip to e.g. C:\roq\.

Important: The path name must not have more than 8 letters!

  • Launch VirtualDubMod and load you AVI. Go to Video menu and set Full processing mode, otherwise you'll get this error on export:
Output settings must be 16/24/32-bit RGB, uncompressed in order to save as TARGA sequence
  • Go to File > Save image sequence... and set the output directory to the folder in which you unzipped the above encoder (e.g. C:\roq\).
  • Set the minimum number of digits in name to the number of numbers of the last frame filename (e.g. 3 if your video has 100-999 frames, 4 if 1000-9999 etc.)
  • Leave the format set to TARGA and click OK.
  • Run RoQCreator.exe, File > Add TGAs and add the .tga files you just created
  • RoQ Directory will be set automatically, but you may set a different RoQ Filename and specify a Sound file (put all files into the same folder and remove the pre-set paths, just type in the filenames with extension)
  • Click Make RoQ to generate a .param file and automatically run the converter

An error may occur if you try to add more than 510 TGAs. If you create a .param file yourself, you can use the converter without the GUI and avoid the error. Example:

INPUT_DIR C:\roq
FILENAME  out.roq
SOUND     myaudio.wav
INPUT
002.tga
003.tga
004.tga
005.tga
006.tga
...
799.tga
800.tga
END_INPUT


Sources:


--CoDEmanX 20:59, 9 January 2012 (UTC)