scratchattach icon indicating copy to clipboard operation
scratchattach copied to clipboard

Is it possible to play a video using this?

Open Stoutscientist opened this issue 2 years ago • 15 comments

I was messing around with this and was wondering if it would be possible to play a video using this by converting the video to base64 or something like that with a decoder in scratch and get at least 1fps? Even if it has to buffer the video into a list or something like that.

Stoutscientist avatar Sep 05 '23 17:09 Stoutscientist

maybe convert the video into separate frames and encode each frame into a set of rgb vals and send them to scratch with cloud requests? if you send a 1 minute video with a res of 4:3 at 1fps, and each frame takes 1 sec to send, then it would take about a minute.

RC9910-Scratch avatar Sep 05 '23 18:09 RC9910-Scratch

That's kind of what I was thinking, but the only problem with this is that there's a fairly short limit on how long of a string you can send

Stoutscientist avatar Sep 05 '23 18:09 Stoutscientist

I have a picture renderer and sometimes the string length would get over 3000 chars, but it still went through, just an warning message in the python console

RC9910-Scratch avatar Sep 05 '23 18:09 RC9910-Scratch

With a resolution of 50x50, at a FPS of 1, 50 seconds video would take 16 minutes to transmit.

programORdie2 avatar Sep 06 '23 15:09 programORdie2

yikes

Stoutscientist avatar Sep 06 '23 18:09 Stoutscientist

With a lowwer resolution, base64 encoding and pixel compressing, you can very maybe get 5 min.

programORdie2 avatar Sep 07 '23 17:09 programORdie2

I heard someone got a browser working years ago, do you know if that actually show'd the page or if it was just basic html text?

Stoutscientist avatar Sep 07 '23 18:09 Stoutscientist

I think it only showed the basic html text.

RC9910-Scratch avatar Sep 07 '23 19:09 RC9910-Scratch

That makes sense, I want to try to recreate it but only allow whitelisted sites/have content filtering.

Stoutscientist avatar Sep 07 '23 21:09 Stoutscientist

One of the issues with sending images to Scratch is that almost all of them are corrupted. I mean, they get randomly cut off or with a weird offset in some rows.

NotFenixio avatar Sep 10 '23 13:09 NotFenixio

I really wish the ST would just implement an extension for this

Stoutscientist avatar Sep 10 '23 14:09 Stoutscientist

Yeah

programORdie2 avatar Sep 11 '23 15:09 programORdie2

In Scratch it's not possible, but in turbowarp it is

TimMcCool avatar Sep 26 '23 18:09 TimMcCool

Well, it is. You can send a 1 FPS video, like a slideshow.

NotFenixio avatar Sep 27 '23 12:09 NotFenixio

Well, it is. You can send a 1 FPS video, like a slideshow.

If it was a 1hr video, that would be 3600 frames (60 secs * 60 mins)

RC9910-Scratch avatar Sep 27 '23 15:09 RC9910-Scratch