Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Video Support  (Read 12178 times)

0 Members and 1 Guest are viewing this topic.

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Video Support
« 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.
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Video Support
« Reply #1 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.
Logged
fl*p

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Re: Video Support
« Reply #2 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.
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 116
    • View Profile
Re: Video Support
« Reply #3 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
Logged

Lazov

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
    • View Profile
Re: Video Support
« Reply #4 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
« Last Edit: January 25, 2020, 04:31:22 PM by Lazov »
Logged

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 116
    • View Profile
Re: Video Support
« Reply #5 on: May 04, 2019, 09:13:39 PM »

Thanks. I'll try it.
Logged
 

Page created in 0.045 seconds with 19 queries.