VideoService
Hi, So I saw a lot of free models that play videos. But need to mass-produce decals which now has a restriction.
Plus this also supports 1080p soon I will get it up to 4k!
My friend and I made a plugin where you can import frames and get a folder with attributes holding hex values to play the video
Plugin:
https://www.roblox.com/library/9506311295/Video-Importer
Module:
https://roblox.com/library/9538531954/vs
How to use:
- Create a new script and add the module as a child.
- Start downloading the plugin - You will need it later
- Use this to convert your video to a png sequence
- You should get a zip, Open that and leave the folder you just got.
- Open Roblox Studio and select the script
- Look for the plugin Video Importer
- Now look for the folder and select all the files (Top to bottom)
- Click done
- Now you should have a folder. Don’t touch that anymore.
- In the script write the following code
local VideoService = require(script.VideoService) -- The module
local Video = VideoService.new(SURFACE GUI) -- Replace SURFACE GUI with the parent
local Object = script.Parent.NewVideo -- The video object you just made
Video:Play(Object) -- Play the video (OPTIONAL: Add another argument, FPS)
- Now if you run this your video should play
Docs:
VideoService.new(parent: Instance)
Creates a new Video object under the parent
VideoService:Record(seconds: int)
Records a playable video
Video:Play(videoObject: Video)
Plays the videoObject created via plugin
Video:Stop()
Stops the video
Video:Initialize()
System function.
How it works in-depth:
The plugin reads and orders the PNG’s given and creates a folder with hexadecimal attributes storing the PNG data. The model makes the hexadecimal into a normal string and uses @Maximum_ADHD’s PNG Library to process it and @boatbomber’s GradientCanvas to show pixels without lag
Credits:
-
Huge thanks to coolpro200021 for help with the plugin and encryption and decryption with Hexadecimal
-
@Maximum_ADHD for his PNG Library
-
@boatbomber for his GradientCanvas
This goes by the license ODbL, read all about it below.
This is not perfect, If you find any bugs please report it below.
I hope you like this resource!