How to Stream video into game
Monkey Forums/Monkey Beginners/How to Stream video into game
| ||
I was wondering is it possible to stream video into a game using Monkey from something like an AVI or WMV file? I was able to stream video Blitz Basic and it was an awesome command. |
| ||
Not built into Monkey, but it's possible on each target with native code. Which target do you want video on? |
| ||
Soap, I wanted to see if I could stream a video with the avi extension. I'm not sure what is meant by target (I'm sorry, my programming and programming vocab is not very good) |
| ||
By target I mean "SUPPORTED PLATFORMS WINDOWS ANDROID FLASH OS X IOS HTML5 LINUX WP7/WP8 XBOX 360" Making it work would be different for each target platform. |
| ||
Oh I was just meaning for Desktop games. But, is for web games too? |
| ||
Well, this was a thing. Not sure what happened to this, though. I imagine it hasn't been worked on in a while; you could always ask him, though. If I remember right, BlitzBasic used to wrap DirectShow for video functionality. In Monkey, you'd need to write your own implementations of various codecs (H264 is probably your best bet for perfect results), or use something platform specific. Realistically, you don't need video in Monkey. I'm personally for creating a real-time system like what Nintendo does for most of the Zelda games. There's also staging images and what-not, which would be a bit of a hybrid; not the best option, either. |
| ||
+1 Yes, with Monkey's speed and image management capability you can create your own animation and control all parameters and reactivity. |
| ||
golomp wrote: +1 Yes, with Monkey's speed and image management capability you can create your own animation and control all parameters and reactivity. I thought he would like to display a pre-rendered video sequence between levels, or maybe he just wants to write a video player. |
| ||
https://code.google.com/p/libtheoraplayer/ https://code.google.com/p/libtheoraplayer/source/browse/#svn%2Ftrunk%2Fdemos http://libtheoraplayer.sourceforge.net/api/html/index.html For desktop this may be best bet to look into if you want longer video cutscenes or cinematics. |
| ||
ffmpeg can convert to almost any video format. It should be easy to integrate this into the compiler pipeline to produce output to any easily supported format to any target, and buil a simpler cross platform "player" for mojo |
| ||
@En929 as ImmutableOctet said it's not been worked on for ages in fact I had forgotten all about it in that project and only rememebred it when I read this post, my solution is by far not really one I would suggest for any targets other than Desktop as it does use a lot of video memory and everything is decompressed, even with only a 3 second video sequence it was still like 80 meg or something. As I recall I looked at writing the native android calls but as I recall I would have had to wrap and call in the whole media object/class and that is way out of my java ability so yeah the possibility is there but needs some one with a much better understanding of the native languages than me to tackle it. |