local L=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local w=require(L.Packages.base64)local I=require(L.Packages["\114\111\098\108\111\120-\118\105\100\101\111-\099\111\100\101\099"])local j=w.decode(buffer.fromstring((script:WaitForChild("\118\105\100\101\111")).Value))local V=1 local J=buffer.create(buffer.len(j)*V)for L=0,V-1,1 do buffer.copy(J,L*buffer.len(j),j)end local u=require(L.Packages["\114\111\098\108\111\120-\118\105\100\101\111-\099\111\100\101\099"].test)local W=table.create(buffer.len(j))for L=1,buffer.len(j),1 do W[L]=buffer.readu8(j,L-1)end local S=u.CreateJPEGfromBytes(W,true,true,false)local H=Instance.new("\069\100\105\116\097\098\108\101\073\109\097\103\101")H.Size=Vector2.new(1024,576)H.Parent=game.Workspace.Map.Part.Decal local D=I.new(J,2)local d=D.Decode(1)H:WritePixels(Vector2.zero,H.Size,d)
--!native
--!optimize 2
--!strict

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local base64 = require(ReplicatedStorage.Packages.base64)
local rbxvideo = require(ReplicatedStorage.Packages["roblox-video-codec"])
local videodata = base64.decode(buffer.fromstring(script:WaitForChild("video").Value))
local testframecount = 1
local testvideodata = buffer.create(buffer.len(videodata) * testframecount)
for i = 0, testframecount - 1 do
	buffer.copy(testvideodata, i * buffer.len(videodata), videodata)
end
local test = require(ReplicatedStorage.Packages["roblox-video-codec"].test)

local bytes = table.create(buffer.len(videodata))
for i = 1, buffer.len(videodata) do
	bytes[i] = buffer.readu8(videodata, i - 1)
end

local _jpegtest = test.CreateJPEGfromBytes(bytes, true, true, false)

local editableImage = Instance.new("EditableImage")
editableImage.Size = Vector2.new(1024, 576)
editableImage.Parent = game.Workspace.Map.Part.Decal

local videostream = rbxvideo.new(testvideodata, 2)
local thing = videostream.Decode(1)
editableImage:WritePixels(Vector2.zero, editableImage.Size, thing)
--[[
game:GetService("RunService").Heartbeat:Connect(function()
	local timenow = os.clock()
	local _thing = videostream.Decode()
	print(os.clock() - timenow)
end)
]]
