Wintermute Engine Forum

Wintermute Engine => WME Lite => Topic started by: mylesblasonato on May 01, 2011, 02:33:58 AM

Title: Video Support
Post by: mylesblasonato on May 01, 2011, 02:33:58 AM
Hello again :)
This question is probably best answered by Mnem but is it possible to integrate a cross-platform API for playing video to the WME Lite source?
I could do it but I just wanted to know if WME is set up for it before I attempt it.

Cheers  ::beer
Myles Blasonato.
Title: Re: Video Support
Post by: odnorf on May 01, 2011, 10:07:28 AM
A universal decoder might be difficult. Imo it's better to use different decoders for different platforms and that's what I have suggested to Mnemonic. iP* devices already have a fast licensed h264 decoder that can be used by apps and for desktop OSes you can still use theora or even better webm. I understand the developers will have to reencode twice but since desktop/mobile devices have different resolutions I think they'd do it anyway, even for the same codec.
Title: Re: Video Support
Post by: mylesblasonato on May 01, 2011, 12:34:20 PM
Thanks for the reply odnorf :)
I guess i'll start working on a iPhone one then.

Cheers  ::beer
Myles Blasonato.
Title: Re: Video Support
Post by: lacosaweb on November 28, 2011, 11:51:46 AM
Hi, any progress in video playing for WME Lite?

Are theora videos can be played or not?

Thanks
Title: Re: Video Support
Post by: Lazov on April 02, 2019, 02:45:53 PM
I was able to add video support for Android. Also checked the work on Linux. But the sound, unfortunately, does not work. I will use this code:

Code: WME Script
  1. method PlayVideoT(video, sound)
  2. {
  3.   var cMusic = Game.GetMusic();
  4.   var cMusicPos = Game.GetMusicPosition();
  5.  
  6.   Game.PlayMusic(sound);
  7.   Game.PlayTheora(video, null, null, null, false);
  8.  
  9.   if (cMusic != null) {
  10.     Game.PlayMusic(cMusic, true);
  11.     Game.SetMusicPosition(cMusicPos);
  12.   }
  13. }
There is a possibility of out-of-sync audio and video, but I did not notice it.

Compiled libraries can be obtained from here:
https://www.cateia.com/libtheoraplayer/wiki/index.php?title=Releases
You need to add these libraries to build files (for example, Makefile). You also need to add the path to the folder with files headers (.h), which are connected in the engine code.

I tested on the following repositories:
https://bitbucket.org/hcdaniel/wmelite-rapaki-edition - Android
https://bitbucket.org/JanKavan/wmelite-julia-branch - Linux
Title: Re: Video Support
Post by: lacosaweb on May 04, 2019, 09:13:39 PM
Thanks. I'll try it.