Race Intro

Race Intros (videos); support/discussion/questions

Moderator: thunderchero

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

Post by thunderchero » Sun Apr 26, 2009 1:21 pm

severenth wrote:besides, i though video and audio were seperate files ?
only for open.avi/intro.wav but c.avi, f.avi, h.avi, k.avi, and r.avi are a single file.

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 » Fri Feb 07, 2014 12:02 am

So, I've tried my best to replicate the results from above, to get a new race intro for the Dominion that the game would recognize, and I've about approached my wits' end. Even involving opening up the file I was working on with a Hex editor, only to find that "JUNK" was already there. Sadly, I don't think I can manage it with my copy of Corel VideoStudio Pro X6. I think I may need Adobe Premiere, which is software I don't have. Any recommendations on how to format the video so that the game will recognize it without investing in new software? (Pro CC seems to be ~20 USD per month, if this would even be the right software, but I'm not familiar with it). Alternatively, if anyone has some free time... I can give them 675 MB of the raw .avi :grin:. Please let me know what I can do; would be much obliged.

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

Re: Race Intro

Post by thunderchero » Fri Feb 07, 2014 12:38 am

Hi Marowi,

If Ircc I use virtualdub just load your video
VirtualDub-1.9.4.zip
(1.43 MiB) Downloaded 34 times
in video tab have "full processing mode" selected

select "compression..."

use "cinepak codec by radius"

video should be 24 fps

audio should pcm 22050Hz 16bit stereo (only program to create this correct format I have found is the "sound recorder" in XP windows "accessories/entertainment") this is a stand alone program but get error on windows 8 for me.
sndrec32.rar
(56.87 KiB) Downloaded 46 times
you might need to hex edit file once you have created it. JUNQ to JUNK

good luck,

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 » Fri Feb 07, 2014 2:04 am

Thunder, seriously, you're the man. I appreciate the fast response and the patience in walking me through all this stuff--yet again. I'll let you know if it works. Actually, that reminds me--I figured out the issue with models. Will post in that thread.

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 » Sat Feb 08, 2014 7:04 pm

Afraid it didn't work. I opened the final product up in a hex editor and found "JUNK" so I don't think that's the problem. I created the video with PCM 22,050 Hz 16 bit stero audio in Corel, then ran it through Virtual Dub. Video resolution is 800x600, which I think is the same resolution as the vanilla race intros. I'm just replacing the vanilla "F" video file with the new intro in the game directory--nothing else. Anything I'm missing?

User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2546
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Race Intro

Post by Flocke » Sat Feb 08, 2014 7:15 pm

easiest will be to upload your video and let thunderchero convert :up:
when it's an exceptional great video I'll see if I can speed up video render support with mpr++

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 » Sun Feb 09, 2014 1:08 am

Well, that'd be up to thunderchero, but I'd happily do it--it might also help to diagnose what I'm doing wrong. Been trying to do this all night, and haven't made any progress. Definitely have spent more time trying to find out what format to put the video in than actually editing the video.

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 » Sun Feb 09, 2014 1:25 am

Marowi wrote:Video resolution is 800x600, which I think is the same resolution as the vanilla race intros.
Actually the original videos are 800x300. I know from the trek.exe code that the game shifts the video vertically 140 pixels to center it on the screen. Maybe that's why it doesn't work.

You could try editing trek.exe to disable it from centering the video. Using a hex editor, change the byte at offset 0x110928 from 8C to 00.

Or you can use this patch with the BoF Patcher:

Code: Select all

NAME: Don't center the intro and race videos
>> 0x110928  8C
<< 0x110928  00

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 » Sun Feb 09, 2014 2:03 am

I thought it might be easier just to put the video into 800x300 and see if that works--no joy, either. Good catch, though--I never really noticed that BOTF runs the race intros in letterbox.

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

Re: Race Intro

Post by thunderchero » Sun Feb 09, 2014 8:16 am

Marowi wrote:Well, that'd be up to thunderchero
It has been 4 years since I last created one but would take a look,
Marowi wrote:I can give them 675 MB of the raw .avi
but this is too large, I know it is raw, so convert it to divx or something smaller. then upload it to some where and I will take a look

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 » Sun Feb 09, 2014 7:00 pm

thunderchero wrote:but this is too large, I know it is raw, so convert it to divx or something smaller. then upload it to some where and I will take a look
Actually, after treating it with VirtualDub, it's now down to 20.9 MB--and I can probably reduce further by zipping it. How can I best get this to you (any preferred method for this kind of work?) Your help is very much appreciated.

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

Re: Race Intro

Post by thunderchero » Sun Feb 09, 2014 8:45 pm

Marowi wrote:How can I best get this to you
you can try to attach it here but fear it might be beyond site limits.

you might see if you can upload it here http://www.4shared.com/dir/2718631/36f4 ... aring.html (my 4shared) if you see upload link at bottom.

if not contact me via PM for e-mail address.

thunderchero

User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2546
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Race Intro

Post by Flocke » Mon Feb 10, 2014 11:02 am

so thunderchero gave it a try and I had a look also, though I have no video editing software installed atm to try export myself
for now we didn't get it work either
there must be something changed with exporting filters or so
taking a look at hex code at end of file the working videos have "rec" every second line while the new exported video has not
I only can guess it is for video/sound synchronization. :sad:

further while your video looks great, it really jerks too much to my taste, but when you have a better quality with higher res and not jerking, at some time I can take a look to render it with ogre theora video plugin and use ogg vorbis for sound, shouldn't be too complicated, I played with it before :wink:

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 » Mon Feb 10, 2014 12:50 pm

I don't know if this helps, but the Falcon 4 source code has the movie code for BotF. I compared the code in falcon4sc/movie against Trek.exe, and they match almost exactly.

By the looks of the code, it doesn't matter what codec is used, since it uses the Windows API ICDecompressOpen() to find the relevant codec:

Code: Select all

// movie/avimovie.c:411
   item->hIC = ICDecompressOpen( ICTYPE_VIDEO,
                  item->aviStreams.strh1.fccHandler,
                  &( item->aviStreams.bihIn ),
                  ( LPBITMAPINFOHEADER ) &( item->bihOut ) );
You can see it uses the FourCC handler code stored in the AVI stream header (I think that's the codec).

I guess we could isolate the Falcon movie code, turn it into a little standalone movie player, and add lots of diagnostics/assertions to it. That way, we can figure out precisely what the problem is.

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 » Mon Feb 10, 2014 10:02 pm

I think I've fixed the problem. As usual, it's a bug in BotF, not the video files.

According to the AVI specifications, AVI is an extensible format. Applications are supposed to skip chunks of data in the AVI stream that they don't understand, so as to make the format extensible. Many modern encoders insert metadata into the AVI stream. When BotF sees these INFO chunks, it bails out. So I've made a small modification that makes Trek.exe skip those chunks it can't process:

Code: Select all

NAME: Better AVI handling
DESC: Causes aviOpen to skip chunks it doesn't understand.
AUTHOR: QuasarDonkey

>> 0x14ab91  75 DE
<< 0x14ab91  75 AE

>> 0x14ab71  B8 FE FF FF FF 83 C4 38 5D 5F 5E 59 C3
<< 0x14ab71  EB CE 83 6C 24 30 04 EB D4 90 90 90 90

>> 0x14ab9b  75 D4
<< 0x14ab9b  75 D6
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.

I haven't gotten any other codecs working. I think it might have something to do the color space. Cinepak uses RGB 24-bit, but most other codecs I looked at use YUV. I don't know much about video codecs though.

Post Reply

Return to “Race Intros (videos)”

Who is online

Users browsing this forum: No registered users