First post, by stahlhart06
First post here for me, reaching out at the moment feeling both frustrated and aggravated. Has anyone here reading this ever compiled an id Tech 3 .RoQ video?
Over the years I have been going through my game libraries looking for older titles that are broken in one way or another and fixing them, and for the most part this has been successful, with the exception of two games that continue to defy any effort at correction. One is the subject of another discussion that I'm still collecting my thoughts on, but the current effort has been toward the first Call of Duty.
Unlike its expansion United Offensive, which uses Bink video and works just fine, the first chapter uses id's .RoQ format for the introductory company logos and the game's intro and outro. I guess that they must have worked fine on XP back when the game was first published, but under Windows 7/10/11 the Activision and Infinity Ward logos are buggy and unpredictable. Once in a while they all play correctly. A little more often the two company logos play, but the game intro is skipped, and the game goes directly to the main menu. Most of the time only the Activision logo plays, then there is a brief burst of audio from the end of the Infinity Ward logo, before the main menu appears.
Once in a great while, if you hit a key during the Activision logo at just the right moment, you will skip over the Infinity Ward logo and the game intro will play.
I figured out that if I create an autoexec.cfg file and put in the following command:
cinematic cod_intro.roq
... and disable the launching of intros in config.cfg with:
seta com r_introplayed "1"
...and launch the game from a shortcut that runs the autoexec.cfg, the intro plays perfectly.
So I think, okay, I'll concatenate the two logo files and re-encode all three into a single .RoQ and then call that file from the autoexec.cfg instead. But no go. There doesn't seem to be an editing or compiling tool on the planet that can properly encode a .RoQ that Call of Duty will play. Invariably I end up with the audio and video out of sync, with the audio lagging by about a half second, and the video crashes a split second into the Infinity Ward logo after stuttering through the Activision one, crashing into the main menu. At least it doesn't crash the game.
I've tried every command I could search for using ffmpeg, I've tried Quake Video Maker, without any success. The compiled videos look correct with an ffprobe command, I have the streams in the correct order in the container, the codecs and bit rates are correct, but they still don't work. And in a hex editor they don't look even remotely similar in terms of structure.
There apparently was at time a tool called Switchblade 4 for this, which had executables for creating the codebook and compiling the video, but a search for this comes up empty, apart from references to it in a few old forum threads.
I found a RoQ compiler on ModDB, and I'll probably give that a shot next, though it will require me to break up about a minute and a half of video into individual .TGA frames. I guess that I can start small and see if it will recreate the logos correctly, where I could substitute those in for the originals to validate the process before I take on the game intro.
Reaching out here to see if anyone has successfully done this with ffmpeg and knows how to keep the audio and video properly in sync -- or is this just an operating system incompatibility that's unfixable? I'm starting to wonder if ffmpeg simply isn't capable of supporting the .RoQ format correctly. One thing I found along the way is that ffmpeg won't copy an untouched video stream from input to output using -c copy. It just drops the video completely, and you only get audio in the output. This ended up forcing me to run -map commands in the last encoding step to ensure audio was stream #0 and video #1 in the final file, as they need to be in that order for Call of Duty to play them. ffmpeg also places video in #0 by default, but there doesn't appear to be a standard order for .RoQ as there is no consistency in id Tech 3 games. Return to Castle Wolfenstein videos are #0 video and #1 audio.
I also wonder if this is the reason Gray Matter appended a binkplay library/thread into the game executable for it to play .biks instead of .roqs. United Offensive launches perfectly in Windows 11.
Does anyone here have any experience with this? Thanks in advance ...
