Race Intro

Race Intros (videos); support/discussion/questions

Moderator: thunderchero

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7851
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Race Intro

Post by thunderchero »

QuasarDonkey wrote:The first was a simple re-encoding of open.avi
The open.avi is no problem, the problem we are having is with the race avi's (C.avi, F.avi, H.avi, K.avi and R.avi) these files have video and audio in 1 file.

video without audio will play, but once audio is added to video it will skips avi.

here is vanilla file format for C.avi

File C.avi
File Size: 11.06MB bytes
Total Duration: 0:00:24:00
Average Data Rate: 472.23KB per second
Image Size: 800 x 300
Pixel Depth: 24 bits
Frame Rate: 24.00 fps

Audio: 22050 Hz - 16 bit - Stereo

AVI File details:
Contains 1 video track(s) and 1 audio track(s).

Video track 1:
Total duration is 0:00:24:00
Size is 9.23MB bytes (average frame = 19.59KB bytes)
There are 1 keyframes, 575 delta frames.
Frame rate is 23.100 fps
Frame size is 800 x 300
Depth is 24 bits.
Compressor: 'cvid', Cinepak Codec by Radius

Audio track 1:
Size is 1.78MB bytes
Rate is 22050 samples/sec, stereo
Sample size is 16 bits

not sure if mencoder will add the audio correctly not very good at command usage.

Here is the files I am attempting to add for Marowi test_F.rar

thunderchero
User avatar
Marowi
Cadet 4th Year
Cadet 4th Year
Posts: 18
Joined: Tue Dec 24, 2013 3:28 pm

Re: Race Intro

Post by Marowi »

First of all, I want to say thanks for these valiant efforts--hopefully we can figure something out for the sake of future generations (of mods).

A couple of questions:
thunderchero wrote:video without audio will play, but once audio is added to video it will skips avi
How did you strip the audio out to get the video alone to play in-game?
QuasarDonkey wrote:I've tested this with 2 different AVIs I generated with mencoder (using the Cinepak codec). The first was a simple re-encoding of open.avi; the second was a random youtube video. Both work fine with the patch, but not without.
It's probably a safe bet that trek.exe is told to bail out of INFO chunks in the race intros, in addition to aviOpen. Presumably the same fix could be accomplished? (I have no fluency for identifying these lines, I'm afraid, about the best I can do is input your changes with something like XVI32).
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: Race Intro

Post by QuasarDonkey »

Code: Select all

It's probably a safe bet that trek.exe is told to bail out of INFO chunks in the race intros, in addition to aviOpen.
aviOpen is just a name I made up for a subroutine in Trek.exe that opens AVI files. It handles the race intro videos too. You're right, it does bail out on the INFO chunks, but the patch fixes that. No, that's not the main problem here.

By the looks of it, at least with mencoder, the AVI muxer is not grouping the interleaved audio and video data into records, which BotF expects it to. Call it a limitation in the BotF code.
msdn.microsoft.com wrote:Following the header information is a 'movi' list that contains the actual data in the streams—that is, the video frames and audio samples. The data chunks can reside directly in the 'movi' list, or they might be grouped within 'rec ' lists. The 'rec ' grouping implies that the grouped chunks should be read from disk all at once, and is intended for files that are interleaved to play from CD-ROM.
(By "interleaved", they just mean "video interleaved with audio").

Now BotF expects the data chunks to be grouped into "rec " lists if the file has more than one stream (i.e. if it has an audio track). It bails if the data chunks reside directly in the 'movi' list. Which is exactly where our modern video encoders/muxers are placing them.

At least with mencoder. I'm assuming VirtualDub is doing the same. And I can't find any way of telling it to generate the "rec " lists. Maybe there's some option in VirtualDub?

It should be possible to build a patch for this if needs be. I can take a look tomorrow.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7851
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Race Intro

Post by thunderchero »

Marowi wrote:How did you strip the audio out to get the video alone to play in-game?
the link in my post above has 2 files video and audio, I used VirtualDub to separate them.
QuasarDonkey wrote:And I can't find any way of telling it to generate the "rec " lists. Maybe there's some option in VirtualDub?
this info might be helpful, :grin: But like you I will have to take a look tomorrow. correct I have not seen "rec" list option in VirtualDub but might have seen it in one of the others I have been trying to use.

thunderchero
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: Race Intro

Post by QuasarDonkey »

I found a program called AVI-Mux GUI that can write out the REC lists.

And now the video plays in BotF! Well, sort of. It's kind of fast. Actually, it plays crazy fast. And with no audio. So maybe the muxer is screwing up the headers or something. But I think we're making progress. :grin:
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7851
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Race Intro

Post by thunderchero »

QuasarDonkey wrote:I found a program called AVI-Mux GUI that can write out the REC lists.
That is the program I was using yesterday :up:

I am very close, I got video to play with audio, but when video ends it will stay on last frame and not go directly into game without mouse click.

thunderchero
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7851
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Race Intro

Post by thunderchero »

I have figured out how to make video end and go into game properly. :grin:

I will post how to and required files shortly once I have tested a little more.

thunderchero
User avatar
Marowi
Cadet 4th Year
Cadet 4th Year
Posts: 18
Joined: Tue Dec 24, 2013 3:28 pm

Re: Race Intro

Post by Marowi »

Thunderchero, that's astonishingly good news. I look forward to hearing the solution once you complete your testing. Then we can sup up the video with no fear that it's for naught :razz:
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7851
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Race Intro

Post by thunderchero »

Marowi wrote:Thunderchero, that's astonishingly good news. I look forward to hearing the solution once you complete your testing. Then we can sup up the video with no fear that it's for naught :razz:
See this post for instructions

viewtopic.php?f=92&t=3108

thunderchero
Post Reply

Return to “Race Intros (videos)”