I'm making an adventure game, and I want to make it play movie files to keep the story interesting ::) , but the game plays one movie and won't play another!
The movie files have the .mov extension, for Quicktime Movie - I know the FAQ says it can only play .mpg and .avi files, but these seem to work for the moment. In the game, you're supposed to recover some evidence from a security camera. When you touch it, it uses this script line:
PlayVideo ("Robbery.mov", 1, 3);
Which also works the first time. But when I continue through the game where another movie is played, or if I return to the camera and try to play the movie again, it comes up with this error message:
Error-unable to play video stream
That's not the EXACT error message, but it's pretty close. If I have to go into deeper detail later in this topic, I'll tell you the EXACT message.
Could somebody please help? ???
well, im sure youre going to have to convert to the mentioned movie files. it seems you've found an unsupported format on ags, and for the error mentioned, its proof that its not approved for use. yeah, thats cool that it worked the first time, but i dont believe we'll be able to fix this one. if you post up the error message, ill move this to the tech forum so CJ will get a better chance to see this post, but still, I'm going to have to say you should read up on those .avi's and such.
Here's the exact error message:
Video playing error: Unable to play stream
I'll try converting the ".mov"s to ".avi"s soon to see if it helps.
Nope. Doesn't help.
In fact, I get the exact same error message! ???
I went to Windows Media Player and opened the .mov files and said "Save as." I typed in the name with the .avi extension on it, saved, opened AGS, redid the script, played the game, and nothing has changed!!! >:(
I think you need to use an actual movie editing program to save it as a .avi file. What you did was probably movie1.avi.mov, unknowingly.
Where would I get a movie editing program, possibly free? ???
Meanwhile, I have another question. How would I control and play multiple characters in my game, a la Day of the Tentacle, but with five characters instead of three? And how would I switch among them?
Got a movie editing program, saved as .avi, put it in the game, EXACT SAME ERROR MESSAGE.
Obviously it's a problem with AGS...
I wouldn't jump to conclusions so far... but we'll see what CJ has to say.
Hmmm well, I read your line of code over, and that you set the FLAGS variable to 3, which is not documented as a supported value in the manual, the supported values are:
Quote0: the video will be played at original size, with AVI audio
1: the video will be stretched to full screen, with appropriate black borders to maintain its aspect ratio and AVI audio.
10: original size, with game audio continuing (AVI audio muted)
11: stretched to full screen, with game audio continuing (AVI audio muted)
Try setting that variable to one of teh above values and see if the prooblem's gone.
Actually I suspect that you get the two parameters mixed up, you probably want:
PlayVideo ("Robbery.mov",
3,
1);
as documented in the manual, though I agree that the entry for that function in the manual can be a bit misleading.
Thanx. You were right about switching the numbers around. Now the movie plays fullscreen like it's supposed to, but I still get an error message after the first playing! ??? ??? ??? ???
Oh yeah, to make switch characters just use
SetPlayerCharacter (charid);
.:Zor:.
Strange - is it possible for you to try it out on another computer and see if it has the same problem? Also, I'd recommend making sure you have the latest DirectX version installed.
What's teh error message now, actually?
"Unable to play stream" happens if the call to IMultiMediaStream::SetState (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/htm/imultimediastreamsetstate.asp) fails. It's odd, I've never seen it failing there before.
I have DirectX 8.1.
It's probably worth upgrading to DirectX 9.0b and see if that fixes the problem.
I'm pretty sure DirectX isn't the problem, because the movies run fine in an ordinary movie player on the computer.
Would it help if I put a beta of the game on the Internet, so you guys could look at it? ???
That might be an idea - or even, just post a test game which simply plays the video twice, to easily see if other people have the same problem without giving the game away.