Video
Blitz3D Forums/Blitz3D Programming/Video
| ||
Hi guys. I am using blitz3d for a future project, and need to know what my options are for playing video inside blitz. The video clips will be my own (as in they will be distributed from me, not loaded up by the user (like in a video editor)) They just need to be quite good quality, smallish in size, run in blitz, with some kind of basic control (pause, stop etc) and play on oldish (800mhz/1ghz) computers that don't have codec packs installed (a codec install would be acceptable, if it can be hidden). I will pretty much consider anything and any format, commercial lib's, something like bink, some decent code, just so long as it meets the reguirments above and someone has had a good experiance with it. Thanks :) |
| ||
I know that without using external libs blitz can play avi files and mpeg files but not .mov or .wmv files. I also know that there used to be a memory leak with the movie commands which was fixed around 1.9x (yet remains in blitzplus...). Using standard blitz commands you can play a movie, and that is about it, no rewind/pause/fast forward or other standard movie player functions. I thought in the toolbox there were some movie libs but haven't had a look...maybe you could ;) |
| ||
I had a look in there first, but didn't find anything. |
| ||
The first thing you'll need is this: avifil32.DECLS Put this in your userlibs subdir under the blitz3d directory. The you'll need to figure out how to access the various windows video functions within. |
| ||
does this use a system registered dll? So I don't need to distrubute it with my app? |
| ||
It uses a dll which is already in Windows System32 folder. _33, where can we get a better description of the parameters (and return values)? |
| ||
can anyone suggest anything else? what about wrapping up movies as seperate exe's using osmehting like bink, and then having blitz just load up the exe when the movie needs to be played. I think this will be my fallback plan if all else fales. |
| ||
John, I'd have to code an example, but the parameters are really straight forward IMHO. You'd have to go through the MSDN docs to find out. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_avifileinfo.asp Here's another solution: http://www.blitzbasic.com/codearcs/codearcs.php?code=1329 This is SSwift's solution which uses winmm. So, you'd also need to create a winmm.DECLS if you haven't already. http://www.blitzforum.de/forum/viewtopic.php?t=3915 |
| ||
Many thanks, _33. |
| ||
Hey, I have been playing around with the SSwift's MCI stuff in the code archives: http://blitzbasic.com/codearcs/codearcs.php?code=1329 But I seem to be getting problems when use this in windowed mode (mode 2). Especially if I have a flip command flipping the buffers, it will also flicker the movie. Any ideas on hwo to solve this? |
| ||
I think I remember there was a way around it, but I've forgotten how :) The problem is MCI is drawing to some kind of canvas that is aligned virtually ontop of the blitz canvas. After a flip there's a z-fight. You may try to use Copyrect instead. |
| ||
If you can have a think I will be very grateful :) |