Windows Only AVI/MPG/WMV Playback?

BlitzMax Forums/BlitzMax Programming/Windows Only AVI/MPG/WMV Playback?

Gabriel(Posted 2006) [#1]
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.


popcade(Posted 2006) [#2]
Chris C made a MPEG playback library without sound, which plays MPEG video correctly.

Forgot where's his webiste, try serach for a while.


Gabriel(Posted 2006) [#3]
Thanks. I really needs more than just MPeg though. Maybe I'll try to write a DLL and see how that goes.


H&K(Posted 2006) [#4]
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)


Dreamora(Posted 2006) [#5]
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.


H&K(Posted 2006) [#6]
Oh. So it did make me look stupid then


Gabriel(Posted 2006) [#7]
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.


Dreamora(Posted 2006) [#8]
For that you don't need PB
Check out the WinAPI and Windows Media Player COM functionality :)


tonyg(Posted 2006) [#9]
AVITool
AVITool opened up
dare I mention it : MaxAVI


Russell(Posted 2007) [#10]
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


Beaker(Posted 2007) [#11]
Gabriel - you could release the PB sourcecode, without problems.


Gabriel(Posted 2007) [#12]
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.