Trouble Playing a Video File

Started by Samwise, Sun 17/06/2007 09:01:15

Previous topic - Next topic

Samwise

Hello,

I've got a problem playing a video file in my game.  I've tried to find the solution in the manual and here, but no luck yet.

When I run the game with this command:
PlayVideo ("Jingle.avi", 0, 0);
in the "player enters room - after fade-in" script, the editor throws me back to the Windows XP desktop. 

The test game window still exists though, and after I restore the window (from the desktop)  it either plays the video properly, or jumps to the next command in the script.

Relevant information:
- The video is 640x480, just like the game resolution.
- The video is in AVI format is based on XVID codec, MP3 sound.
- The video plays perfectly when I run it with Windows Media Player.
- The video is saved in the game's compiled directory.
- I've tried to put the command in another script of another room, and bumped into the same problem.

What am I doing wrong?


Privateer Puddin'

Could be something stealing focus.

The Heist by AJA had a tool / reg fix for sorting this

http://custardsclutter.com/divxfix.rar

Sounds like you'll need to use section 3 / 4 from the troubleshooting, you'll need to edit the reg file (open in notepad or something)  and replace GameName with yours.  Probably best to distribute something like this with yours.

I asked AJA permission to re-use this for Drug Bust.

AJA

You might want to consider using WMV videos because they won't steal focus and pretty much every windows system has the codecs installed. Plus the compression isn't that bad either.

Samwise

#3
Privateer Puddin', thanks, it looks a little sophisticated to me but I'll try that later.

AJA, I thought about trying that too, but to my surprise, all the video converters I've tried to use (about 4-5 of them) weren't able to perform such a basic task.

Edit:

Ok, I've converted the movie to WMV, using Microsoft Movie Maker.  The movie does run now, but here's another problem: it cuts 2-3 seconds from the movie - I mean the movie's starting a little late.  Does this has a known solution?


(Also, there's another non-AGS related problem: the audio sounds kinda crappy after the convertion.  Does anybody know how to convert files to WMV without ruining the sound quality?)

AJA

Hmm, I haven't noticed any problems with wmv videos in AGS.

Movie Maker's compression settings are apparently very limited. Try Windows Media Encoder.

Samwise

Thank you, I appreciate your help.

I've solved this issue by loading the AVI video and re-importing the audio on Windows Movie Maker, adding 3 seconds of black screen before the beginning and after the end of the movie file, and saving the whole thing as WMV.  Now it works  :)


SMF spam blocked by CleanTalk