• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Asset - Extension WebM Player

S

Sam (Deleted User)

Guest


Description

  • Major thanks to Nikita Krapivin for helping out a large amount to get it working.
  • Available for Windows 32-bit, Windows 64-bit, macOS, Ubuntu, and Raspbian.
  • Play WebM video files and render them to a surface! Full depth & 3D support.
  • Open source. Permissively licensed. No GPL or Patent related issues at all.
  • Source code on github: https://github.com/time-killer-games/libWebMPlayer
  • Download the Windows 64-bit / Raspbian libraries; replace Win32 / Ubuntu:
  • https://github.com/time-killer-games/libWebMPlayer/releases/tag/v1.0.0.0
  • Converts the video file's raw pixel data to a surface on-the-fly. 100% Native.
  • Say goodbye to misleadingly advertised video players that play zipped PNG's.
  • Plays best on newer hardware with better specs if you expect to play 1080p.
  • That issue will go away entirely; please wait patiently for an updated release.

Download Free from the GameMaker Marketplace

Download Free from the itch.io Game Asset Store

Made for GMS 2.3.1. GameMaker Studio 2.2.5 users can download from itch.io instead.

Ignore the itch.io page saying 2.3.1+, that applies to all assets except the video payer.
 
Last edited by a moderator:

shortbread

Member
This is fantastic!
Do you plan on adding extension builds for Android or iOS? I believe libwebm builds to both platforms https://github.com/webmproject/libwebm/blob/master/Android.mk
Also as the browser already supports WebM, adding a html5 method as well (probably just overlay the video) would make this a total solution for all exports (excluding consoles).

One thing I noticed is that it doesn't currently support Opus (audio doesn't play), but other than that works really well!

Tested in IDE 2.3.2.560 : RT 2.3.2.426
 
S

Sam (Deleted User)

Guest
This is fantastic!
Do you plan on adding extension builds for Android or iOS? I believe libwebm builds to both platforms https://github.com/webmproject/libwebm/blob/master/Android.mk
Also as the browser already supports WebM, adding a html5 method as well (probably just overlay the video) would make this a total solution for all exports (excluding consoles).

One thing I noticed is that it doesn't currently support Opus (audio doesn't play), but other than that works really well!

Tested in IDE 2.3.2.560 : RT 2.3.2.426
I don't target mobile, but I do make the source code available and licensed in such a way people can make/sell/distribute/do whatever with my work they want, with or without modification, and that would include making it available to new platforms.

The goal is to render it to a texture on all platforms that support it, so I'm not all that interested in adding HTML5 support. But that doesn't stop you or anyone else from doing it.

However, I was thinking about adding support for auto detecting URL's being passed to video_add() and using youtube-dl to play the url instead of a local file. Not sure if the opus audio issue will be a concern but iirc youtube-dl has an option to download webm so if it has the right audio codec it should work.

Edit: after searching, youtube uses opus. :/

Edit2: looks like it might be possible in HTML5 after all, and not just an overlay: https://stackoverflow.com/questions...ure-from-html5-video-element-in-sync/63186231
 
Last edited by a moderator:

GDS

Member
works amazing,
but im having a hard time to make the video Restart/loop ( only way i found was to destroy and restart everything)
Any help?
 
S

Sam (Deleted User)

Guest
works amazing,
but im having a hard time to make the video Restart/loop ( only way i found was to destroy and restart everything)
Any help?
I have this api based on someone else's work (BSD-style license so re-using the code for pretty much any purpose is permitted) and they have yet to get back on me on how to make it loop as I asked them and don't really know what to do, either. They have responded to me in the past, but it has been so long since I rented the loop idea and have gotten no response since, it's not looking good at this point.

Video playback is on the GMS roadmap, so hopefully they will address the need for looping.
 
  • Like
Reactions: GDS

GDS

Member
I have this api based on someone else's work (BSD-style license so re-using the code for pretty much any purpose is permitted) and they have yet to get back on me on how to make it loop as I asked them and don't really know what to do, either. They have responded to me in the past, but it has been so long since I rented the loop idea and have gotten no response since, it's not looking good at this point.

Video playback is on the GMS roadmap, so hopefully they will address the need for looping.
thanks for the fast response mate, they always Put and take it of the video playback from the road map for over a year no,
but this time it seems it finally got to "in Development" so this time it may be the charm

Also I Reply like your plugins they do add another flavor to GMS especially the drag and drop one
 
S

Sam (Deleted User)

Guest
We'll be crossing our fingers with expectation, to be sure! I hope they have all the features you and everyone else needed and especially the things my video player lacks like proper looping.
 

GDS

Member
this aint the best solution, But for people having the trouble while looping:
-Start 2x videos,
-The second one give it a +1 deep and a alarm to pause it in the first frame( dont pause at the create)
-at the destroy(end) of the first video um pause the second,change it deep to -1, and retreat like the one above
-and do this as long you want it to loop

Not perfect but the best we have so far
 
S

Sam (Deleted User)

Guest
this aint the best solution, But for people having the trouble while looping:
-Start 2x videos,
-The second one give it a +1 deep and a alarm to pause it in the first frame( dont pause at the create)
-at the destroy(end) of the first video um pause the second,change it deep to -1, and retreat like the one above
-and do this as long you want it to loop

Not perfect but the best we have so far
You can also grab the first frame with the png frame saver function, (its listed in the intellisense typing "video_") and then draw that underneath the video so when it stops and replays, there will be sort of a pause, but is another solution for anyone who finds it viable.

Also this asset got an update recently on itch.io and it can now play the audio track of multiple videos at once, there was a bug previously where the first audio track once finished would stop other tracks playing.
 

Abaloneater

Member
You can also grab the first frame with the png frame saver function, (its listed in the intellisense typing "video_") and then draw that underneath the video so when it stops and replays, there will be sort of a pause, but is another solution for anyone who finds it viable.

Also this asset got an update recently on itch.io and it can now play the audio track of multiple videos at once, there was a bug previously where the first audio track once finished would stop other tracks playing.
Hey Samuel, since gms2 updated to 2022.3.0.624, the functions keeps showing error "wrong number of arguments for function" and stoping the project.
Do you have time to make it work, thanks a lot.
😺
 
S

Sam (Deleted User)

Guest
Hey Samuel, since gms2 updated to 2022.3.0.624, the functions keeps showing error "wrong number of arguments for function" and stoping the project.
Do you have time to make it work, thanks a lot.
😺
Addressing it now. Thanks for letting me know. I'll private message you once I have it fixed, on top of editing this post. Remember to get it from itch.io once I've messaged you.

Edit:

To avoid clashing with the addition of GMS's new video_* functions, I have renamed my video_* functions to have the webm_* prefix instead. Update now on itch.io. This fixes the issue you mentioned.

GameMaker Studio 2.3.1+ Extension Collection by Samuel Venable (itch.io)
 
Last edited by a moderator:
Top