Windows Only AVI/MPG/WMV Playback?
BlitzMax Forums/BlitzMax Programming/Windows Only AVI/MPG/WMV Playback?
| ||
Are there currently any modules which can play MPG, WMV and/or AVI in BlitzMax. Windows is the only format I care about right now. If there are no modules, are there any open source libraries I could wrap? I'm looking for a pretty general purpose, can play anything, type of thing. As much as possible, anyway. |
| ||
Chris C made a MPEG playback library without sound, which plays MPEG video correctly. Forgot where's his webiste, try serach for a while. |
| ||
Thanks. I really needs more than just MPeg though. Maybe I'll try to write a DLL and see how that goes. |
| ||
Well.... If MaxGui can load a html page, and That can have video in it.... Then hows that done then? (I realise that it may make me look stupid, but its worth asking. You know if it starts some jarva script or somthing that plays the stuff, then couldnt you just call that from Bmax) |
| ||
Thats something the HTML render engine does, in case of Windows Internet explorer. But this needs to have the needed plugins present to play video from browser. And no you couldn't just call it from BM but there are windows api calls for video. That isn't the problem after all. The problem is to have video + sound in sync + the whole thing drawn in BM that has NO DirectMedia support (which is why the old blitz play movies) and thus you need to copyrect each frames data from movie to texture buffer or pixmap to draw. |
| ||
Oh. So it did make me look stupid then |
| ||
I wrote a nice little DLL in PureBasic which seems to happily play any MPEG, AVI or WMV I can throw at it. I can't distribute that DLL, unfortunately, because it's against the terms of use to wrap PB functionality and release the DLL, but I can recommend it if anyone wants this functionality. PB just wants an HWND to put the video in, so you can put it in a MaxGUI window, or a panel, canvas, etc. You have to use some kind of eventhook system to pause and resume the video accordingly when the window is dragged, but otherwise, it's pretty sweet. You can dynamically move and resize the video within the window/gadget too. |
| ||
For that you don't need PB Check out the WinAPI and Windows Media Player COM functionality :) |
| ||
AVITool AVITool opened up dare I mention it : MaxAVI |
| ||
Gabriel, if you created a DLL with PB, I don't think using it with another language is against the rules as long as it isn't just a thin wrapper to access PB's command set (like with your own compiler based entirely on PB). I would only hope that any solution here is cross-platform. Russell |
| ||
Gabriel - you could release the PB sourcecode, without problems. |
| ||
Ack, I wish you'd have asked before my old PC went the way of the buffalo, as I'd probably have been able to find it. I expect it's tucked away on my old hard drive, so I'll have a look after work tonight. |