Page 1 of 1

More Q's about Video

Posted: Mon Jun 20, 2005 2:57 pm
by Merk
Sorry everybody -- I'm not really trying to take over the Hugo discussion. It just seems like I'm the only person asking questions right now. :)

Regarding video, I mentioned before that I solved the problem of having the video freeze on the last frame by showing a frame identical to the last frame, as a JPG. This was Kent's suggestion, and it worked great. Originally, though, I thought it might only work if not playing video in "background" mode -- because otherwise I wouldn't have any idea when the video ends, in order to show my still image afterwards. It turns out, though, that the video appears in front. So as long as I show the video and the image in the same window { } block, it works like a charm. When the video ends, the image remains "under" it. It's pretty slick.

So, my first question is this. Does that hold true on all platforms that support video? Will the media player appear in front, or are there platforms where it's actually embedded in the screen? I'm hoping that this trick will work, but I'm worried about other platforms.

Second thing -- because I'm playing video in the background, it continues to play at inappropriate times until it ends. I solved this by making a tiny 1x1 pixel AVI with one frame, basically an "blank" AVI. I play this, and it effectively kills whatever background video was previously playing. So.... again, does this hold true on other platforms, besides just Windows? Will starting a new AVI always end the one playing before?

Thanks,

---- Mike.

Posted: Mon Jun 20, 2005 2:58 pm
by Merk
You know, it seems like I remember seeing something in the Hugo Book, regarding stopping video. Maybe I should re-check that, for my second question...

Posted: Mon Jun 20, 2005 3:59 pm
by Roody_Yogurt
I think every Hugo person here thinks it's cool that someone's asking questions.

Posted: Mon Jun 20, 2005 5:38 pm
by Ice Cream Jonsey
Roody_Yogurt wrote:I think every Hugo person here thinks it's cool that someone's asking questions.
Yeah, I don't get a chance to really read something on the forum that has more to it than "you're gay no you are" and you usually get an answer before I get home and can think about it. But definitely keep posting your questions. I'll probably run into all of them myself sooner rather than later.

Posted: Tue Jun 21, 2005 2:14 pm
by Merk
It looks like the "STOP" command is for stopping background music. I didn't see anything for stopping background video. My work-around might be the right way of doing it? I guess as long as Hugo is only able to play one video at a time, then that would always work. But if there are any ports out there capable of playing more than one video at the same time, it may not...

Anybody run video-enabled versions of Hugo on a platform other than Windows? I could probably come up with a test program. :)

Posted: Tue Jun 21, 2005 3:33 pm
by Kent
I don't think you can be guaranteed that any video will play "in front" of an image behind it, but the way it works on all current platforms is probably the case. DirectX on Windows and QuickTime on the Mac, for instance, open an invisible child window to play the video in front of, and may use overlay to play video depending on the system, video card, driver, etc. BeOS similarly opens a child view to play the video in overtop of the current window.

The reason I say it's not guaranteed is because it's conceivable that someone could in the future on some currently unsupported platform like Linux, Pocket PC, Palm, etc., come up with some system for video playback that draws straight to the game canvas.

To stop video, try "video 0". Not very pretty: the current library routines for handling video are lacking. The FB source code contains some much better media handling code, especially for things like video.

Posted: Tue Jun 21, 2005 9:10 pm
by Hugella2
Perhaps the FB media handling code will be part of what you release? :)