OpenArena

RoQ is the format that the game (Quake3 and derivatives, including OpenArena) supports for video playback. This is about cinematics (pre-rendered videos), they are a different thing than demos.

RoQ videos are rarely used. They may add noticeable filesize and have some limitations... however they can be shown in the GUI (think about the intro video and the tier presentations of Q3A) or even inside the maps.

For players: related variables and commands[]

  • /r_inGameVideo <0 or 1> - Allows (1) or pauses (0) the playback of in-map cinematics. Default value is 1.
  • /s_musicvolume <decimal values between 0.0 and 1.0> - In case the map author placed the audio as map background music, you will need to have it >0 in order to hear the sound. Default value is 0.25.
  • /s_volume <decimal values between 0.0 and 1.0> - It allows to control the volume of sounds. If not using OpenAL, it may also affect background music volume. Default value is 0.8.
  • /s_ambient 1 - In case the map author placed the audio as target_speaker. Needed for DeFRaG mod (or iDFe engine only). Not supported in stock baseoa.
  • /cinematic <filename> - Command to manually play a roq file, full screen. Examples: /cinematic idlogo.roq, /cinematic video/mymap/myvideo.roq

For mappers and mod authors: how-to create a RoQ video[]

Here there are a couple "How to create RoQ video and place it in a map" guides created starting from two written by ZaRR (the first one, the second one), without the use of Quake Video Maker tool (the second one uses roq.exe by idSoftware). Other tutorials (including usage of Quake Video Maker tool) are linked in the External links section.

Note that this guide only covers how to create a RoQ video. The process of adding a video to a map is explained in Mapping manual/Creating dynamic features.

ZaRR's first method[]

Tools:

Must be 256x256 to be played correctly in-level by vanilla Q3/OA. If the RoQ has to be used inside menus (full screen) instead of inside a map, it should be safe up to 512x512.

Videos MUST BE 30 FRAMES PER SECOND.

If you want to play your video back in a id Tech 3 engine game, then input video dimensions MUST BE POWERS OF TWO. This means 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, or 32768.

Audio may be 11025 Hz, 22050 Hz, or 44100 Hz, any number of bits, BUT IT WILL BE ENCODED AS 22050 HZ 16-BIT REGARDLESS OF WHAT YOU DO, so it is a good idea to make your input audio those settings.

And of course if you use ROQ video in-level for Q3/OA then you should keep only video, because sound won't play in-level (we mention workarounds in step 5). Sound should be played back correctly in menus, instead.

1. With XmediaRecode convert, for example, into mpeg without audio and set 30 fps and 256x256 resolution (or with audio, if the video is for menus).
Note: depending from your input video format, maybe you could even skip step 1 and go directly to step 2, as also FFmpeg supports various input formats.

2. Make a shortcut[1] for FFmpeg.exe, right mouse button click on it, select Properties and add this at the end of the command line/destination/object field (exact naming of the field may vary depending from your Windows language):
-i inputname.mpeg -r 30 -s 256x256 outputname.roq
The above is assuming your input and output files will be placed in the same folder of FFmpeg.exe.
You can also use -an option to remove audio.

Inside the pk3, cinematics go under "video" folder (e.g. /video/idlogo.roq or /video/mymap/myvideo.roq[2]).

ZaRR's second method[]

This is a variant which uses different tools than the first method to create the .roq files. But the part about how to use it in your maps is the same.
So, this replaces the first two steps of the previous method, the rest is the same.

Tools:

Shotcut steps:
Export your video file in 2 steps, to get a series of images and an audio file:
1. Export to .bmp 256x256 (you may probably also use 128x128 or 512x512 -the latter one only for playback in menus, not in-game-. Sizes should be powers of two.), be sure to set aspect correction to same 256x256. (Don't export to .jpg because aspect correction may be lost)
2. Export to .wav 22khz STEREO for /cinematic or MONO for in-game. (Normalize audio if needed, ZaRR used OcenAudio for that)
Note: ZaRR said that Shotcut supports RoQ video (so in theory you may just export directly to roq format from it), but he wasn't able to make /cinematic play the sound if he created the video file that way.

XnView steps:
Check sizes of exported .bmp files, they should be indeed 256x256 if that was your target.
Select them all and CTRL+U to multi-convert.
Choose .jpg format and in "filters" you may use "Auto-crop by colour (black)" if needed, or just crop. But converting to .jpg is needed for sure, because the old RoQ.exe program doesn't work with .bmp files (it seems to support jpg and tga).
When it's done, delete old bmp files or move them somewhere else.

RoQ.exe steps:
Use a plain text editor to modify a .param file (or create a new one by copying one of the existing ones) according to your needs (set appropriate folders and filenames) and then run RoQ.exe with your .param file name (e.g. roq.exe idlogo.param).

Additional tips[]

  • A simple way to have a RoQ video launch when starting your own mod is to provide players a .bat file containing a command similar to ..\openarena.exe +set fs_game flagraiders2 +cinematic idlogo.roq[3] (if you want to test it with FlagRaiders mod, which includes a short roq file). Of course, .bat files work under Windows... under Linux you would use a .sh script instead.
    • Of course, that requires players to launch your mod using such scripts. And autodownload can provide them only pk3 files. If you are programming your own mod, you may be able to modify its code to automatically play a video when you wish, instead.

External links[]

See also[]

Notes[]

  1. If you prefer, you could use command prompt or a batch file instead of using a shortcut.
  2. As you can guess, in case of in-level videos, the second kind of path is advisable.
  3. The initial "..\" is assuming the .bat file is placed inside the mod folder. The same may be obtained without the "..\" at the beginning of the line, but adding a previous line containing "cd .." instead.