@gilbert189

i'm gilbert_given_189 on Scratch.

Question

Why is there a flask next to my username?

Stats for nerds

Joined 3 years ago
Posts 1479
Followers 60 [>]
Following 11 [>]

the butter building

YouTube video
gilbert189 @gilbert189 📌

Let’s play a game of “Fortunately, Unfortunately“. Respond the previous post (the first comment below this post) by replying this post (not the previous post!)

I’ll start with: “I found this website.“

Oct 28, 2021, 8:40 AM
91
gilbert189 @gilbert189

oh no, quantum physics

Jan 23, 2024, 4:27 AM
0
gilbert189 @gilbert189

I’ve been assigned to be a panelist at my parliamentary-style debate next week

I had to make at least 8 questions but most of the motions are literal questions like “will AI take over the world“

There’s this urge of including the motion as a question but I’d decided not to, though I feared that my question deviate from the motion

Jan 22, 2024, 4:27 PM
0
gilbert189 @gilbert189

it’s nighty morning

i guess

Jan 22, 2024, 4:04 PM
0
gilbert189 @gilbert189

Don’t you love it when Firefox thought “this guy is pressing a key, let’s go unresponsive for no particular reason”

Jan 20, 2024, 5:45 AM
0
gilbert189 @gilbert189

I had a feeling there’s an easier way to do this but I implemented this

class Scope:
	def __enter__(self):
		self.glb_keys = set(globals().keys())
		print(self.glb_keys)

	def __exit__(self, exc_type, exc_value, traceback):
		glb_keys = set(globals().keys())
		for diff in glb_keys - self.glb_keys:
			del globals()[diff]

foo = 1
bar = 2
with Scope():
	baz = 3

print(globals().keys())
Jan 19, 2024, 6:06 PM
0
gilbert189 @gilbert189

We may look alike, but I'm actually just an alternate version of the real Gilbert.

—Gilbert189’s siggy in the ProBoards TBG Forums

Jan 19, 2024, 3:52 PM
0
gilbert189 @gilbert189

The TBGs (domain) is dead, long live the TBGs (domain)

Jan 19, 2024, 2:57 PM
5
gilbert189 @gilbert189

Why is there still a Christmas event mid-January

And why did I get struck by Carey in the process
 twice

Jan 19, 2024, 3:05 AM
0
gilbert189 @gilbert189

You know what’s funny about this?

I tried to upload a SVG with a script tag on it (because Rick Astley) and the Assets rejected it (which is great, seriously!) So they had the filter already set up, just only for images.

Way to go Scratch admins.

gilbert189 @gilbert189

Putting MP4s in Scratch and how it behaves

Disclaimer: While it is possible to upload MP4 files to Scratch, I would not advise you to do so yourself. I believe that what I have done here is legally okay, because there is no part of any legal instruments I found at Scratch that limits the user to upload files of a certain type. It's just I don't want people to abuse this unintended feature for things the ST may not like. I do this purely because no one, not even the servers stopped me from doing this, and I think it is quite interesting. But please, don't abuse them. Call me a hypocrite or something.

One thing I noticed when I use those YouTube downloader sites (not that you should use them) are the files they give. [small]Yes, I know the thing that powers essentially all of them.[/small] Even though the files are in the .mp3 extension, the contents are always a MP4 container with only a single audio stream. And yet they seem to play back fine in Scratch. What's up with that?

Initially, I thought the files are re-encoded into an MP3 file in the editor. To see it in action, I uploaded such file to Scratch from the editor. It imported fine, and I can save the project and upload the file to the Assets since the file is just around 8 MBs.

However, when I went to check the assets link with FFprobe, it turns out that the file is still encoded in MP4, and still on AAC (a successor of MP3)

clicky@asusArch /m/other > ffprobe https://assets.scratch.mit.edu/f568e57649758bf9504ca58f29...
ffprobe version n6.0 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 13.2.1 (GCC) 20230801
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
  libavutil      58.  2.100 / 58.  2.100
  libavcodec    60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter    9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample  4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://assets.scratch.mit.edu/f568e57649758bf9504ca58f29...':
  Metadata:
    major_brand    : dash
    minor_version  : 0
    compatible_brands: iso6mp41
    creation_time  : 2019-08-17T22:30:30.000000Z
  Duration: 00:07:59.96, start: 0.000000, bitrate: 129 kb/s
  Stream #0:0[0x1](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
    Metadata:
      creation_time  : 2019-08-17T22:30:30.000000Z
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id      : [0][0][0][0]

Now, the idea of putting something that should be incompatible into Assets is not something new. Everyone who has tinkered around with "that extension" or some bookmarklet people have coded before might have known (and likely abused) this. But the fact that Scratch itself just allows these files without converting or even checking them is just astonishing. Even the built-in audio editor can edit these files without any sort of hiccups.

Armed with this knowledge, I began to wonder...

Does Scratch support Opus?

Yes.

With my FFmpegăźèĄ“, I made an audio file, in a MP4 container, encoded in Opus, and uploaded it to Scratch. It works, and we can even edit it if we want to.

This is a huge thing. Opus is so much better at compressing audio than MP3, full stop. Imagine a single, good-sounding 30 minute audio file in a Scratch project. Piece of cake for Opus, but virtually impossible using MP3. You don't have to take my word for it, just listen and compare it yourself here.

Not that you would want to upload a half-hour audio file to Scratch.

How does Scratch handle files with multiple audio streams?

Scratch only picks the first audio stream. AFAIK, there's no way to switch to a different audio stream, simply because Scratch isn't expecting an audio file to have multiple audio streams.

However, the streams are still accessible, if you download it from the Assets link, and you have a player that supports them.

Does Scratch support Matroska (and its relative WebM)?

Unfortunately, no. The audio editor just blanks out and you can't play them.However, the file itself is still intact, if you download it from the Assets link. It's just Scratch that can't read the file.

Weirdly, WebM files seems to work perfectly. Perhaps that's where the Web name come from. Or probably the supported containers are ones supported on your browser.

What happens if you export the files back?

This is what I found to be the most interesting. At least in my copy of Firefox, the file will be saved as an .m4a file, as if Firefox knew this is a MPEG-4 file (which it does). Not sure how other browsers reacts with them, but I'm pretty sure it will do more or less the same thing. This also happens with WebM files.

How does Scratch handle video streams?

The video stream gets ignored. It seems like the only thing Scratch cares about is that first audio stream.

The same thing also apply to subtitles.

How does Scratch handle files with no audio streams?

Unsurprisingly, it doesn't work. The same symptoms from trying to upload Matroska file applies here.

* * *

Seeing the current trend of Scratch fixing bugs people perceive as a feature, I can only beg the question: would the ST fix this unintended behavior, and if so, how?

Full Assets cleanup is out of the question. They would have to inspect millions of assets uploaded to Scratch, convert them to MP3s without losing any quality if they fancy it, and somehow keeping them at least 10 MB (or the earlier 50 MB). It's not impossible, but it's impracticable.

Inspecting the uploaded files in the backend is much more sensible. So sensible in fact I'm surprised they haven't implemented it yet. Maybe it's just laziness or they haven't thought of it, maybe the struggle for the server to scan every uploaded assets or the team implementing it is not worth it, or maybe they ignore it since it's merely an edge case that only a minority would use. What they didn't realize is that they let a door open for geeks like me and others, to put any sort of media, in whatever codecs we might use, to our heart's content.

Maybe someday the ST will close this door for good (or evil). Probably after I posted this topic they will say "oh yeah, we haven't thought of that" and patch the servers to thwart everyone trying to upload a video on the Assets. Maybe this topic will end in the dustbin for being potentially dangerous or something. I don't know. But I hope you know that it's possible.

(Now, should I post this on Scratch
?)

Jan 14, 2024, 5:40 PM
0
Jan 18, 2024, 5:41 PM
2
gilbert189 @gilbert189

for the next semester of my Android extra, I’m learning Flutter

Jan 18, 2024, 6:56 AM
0
gilbert189 @gilbert189

why do I like looking at debates

(not the presidential debaye, just normal, non-Internet debate)

Jan 16, 2024, 2:10 PM
1
gilbert189 @gilbert189

suggest a female character for me to turn into a Mii

Jan 16, 2024, 7:09 AM
0
gilbert189 @gilbert189

Putting MP4s in Scratch and how it behaves

Disclaimer: While it is possible to upload MP4 files to Scratch, I would not advise you to do so yourself. I believe that what I have done here is legally okay, because there is no part of any legal instruments I found at Scratch that limits the user to upload files of a certain type. It's just I don't want people to abuse this unintended feature for things the ST may not like. I do this purely because no one, not even the servers stopped me from doing this, and I think it is quite interesting. But please, don't abuse them. Call me a hypocrite or something.

One thing I noticed when I use those YouTube downloader sites (not that you should use them) are the files they give. [small]Yes, I know the thing that powers essentially all of them.[/small] Even though the files are in the .mp3 extension, the contents are always a MP4 container with only a single audio stream. And yet they seem to play back fine in Scratch. What's up with that?

Initially, I thought the files are re-encoded into an MP3 file in the editor. To see it in action, I uploaded such file to Scratch from the editor. It imported fine, and I can save the project and upload the file to the Assets since the file is just around 8 MBs.

However, when I went to check the assets link with FFprobe, it turns out that the file is still encoded in MP4, and still on AAC (a successor of MP3)

clicky@asusArch /m/other > ffprobe https://assets.scratch.mit.edu/f568e57649758bf9504ca58f29...
ffprobe version n6.0 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 13.2.1 (GCC) 20230801
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
  libavutil      58.  2.100 / 58.  2.100
  libavcodec    60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter    9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample  4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://assets.scratch.mit.edu/f568e57649758bf9504ca58f29...':
  Metadata:
    major_brand    : dash
    minor_version  : 0
    compatible_brands: iso6mp41
    creation_time  : 2019-08-17T22:30:30.000000Z
  Duration: 00:07:59.96, start: 0.000000, bitrate: 129 kb/s
  Stream #0:0[0x1](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
    Metadata:
      creation_time  : 2019-08-17T22:30:30.000000Z
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id      : [0][0][0][0]

Now, the idea of putting something that should be incompatible into Assets is not something new. Everyone who has tinkered around with "that extension" or some bookmarklet people have coded before might have known (and likely abused) this. But the fact that Scratch itself just allows these files without converting or even checking them is just astonishing. Even the built-in audio editor can edit these files without any sort of hiccups.

Armed with this knowledge, I began to wonder...

Does Scratch support Opus?

Yes.

With my FFmpegăźèĄ“, I made an audio file, in a MP4 container, encoded in Opus, and uploaded it to Scratch. It works, and we can even edit it if we want to.

This is a huge thing. Opus is so much better at compressing audio than MP3, full stop. Imagine a single, good-sounding 30 minute audio file in a Scratch project. Piece of cake for Opus, but virtually impossible using MP3. You don't have to take my word for it, just listen and compare it yourself here.

Not that you would want to upload a half-hour audio file to Scratch.

How does Scratch handle files with multiple audio streams?

Scratch only picks the first audio stream. AFAIK, there's no way to switch to a different audio stream, simply because Scratch isn't expecting an audio file to have multiple audio streams.

However, the streams are still accessible, if you download it from the Assets link, and you have a player that supports them.

Does Scratch support Matroska (and its relative WebM)?

Unfortunately, no. The audio editor just blanks out and you can't play them.However, the file itself is still intact, if you download it from the Assets link. It's just Scratch that can't read the file.

Weirdly, WebM files seems to work perfectly. Perhaps that's where the Web name come from. Or probably the supported containers are ones supported on your browser.

What happens if you export the files back?

This is what I found to be the most interesting. At least in my copy of Firefox, the file will be saved as an .m4a file, as if Firefox knew this is a MPEG-4 file (which it does). Not sure how other browsers reacts with them, but I'm pretty sure it will do more or less the same thing. This also happens with WebM files.

How does Scratch handle video streams?

The video stream gets ignored. It seems like the only thing Scratch cares about is that first audio stream.

The same thing also apply to subtitles.

How does Scratch handle files with no audio streams?

Unsurprisingly, it doesn't work. The same symptoms from trying to upload Matroska file applies here.

* * *

Seeing the current trend of Scratch fixing bugs people perceive as a feature, I can only beg the question: would the ST fix this unintended behavior, and if so, how?

Full Assets cleanup is out of the question. They would have to inspect millions of assets uploaded to Scratch, convert them to MP3s without losing any quality if they fancy it, and somehow keeping them at least 10 MB (or the earlier 50 MB). It's not impossible, but it's impracticable.

Inspecting the uploaded files in the backend is much more sensible. So sensible in fact I'm surprised they haven't implemented it yet. Maybe it's just laziness or they haven't thought of it, maybe the struggle for the server to scan every uploaded assets or the team implementing it is not worth it, or maybe they ignore it since it's merely an edge case that only a minority would use. What they didn't realize is that they let a door open for geeks like me and others, to put any sort of media, in whatever codecs we might use, to our heart's content.

Maybe someday the ST will close this door for good (or evil). Probably after I posted this topic they will say "oh yeah, we haven't thought of that" and patch the servers to thwart everyone trying to upload a video on the Assets. Maybe this topic will end in the dustbin for being potentially dangerous or something. I don't know. But I hope you know that it's possible.

(Now, should I post this on Scratch
?)

Jan 14, 2024, 5:40 PM
0
gilbert189 @gilbert189

I wonder how those “(some game) but an AI wrote it” were made

Jan 13, 2024, 1:51 PM
1
gilbert189 @gilbert189

Front Desk Staff: "Welcome to the Kerberos Hotel. How may I help you?"

Hale Childeric: "I would like to book a reservation for two nights."

Front Desk Staff: "Sure! May I have your ID card please?"

(Hale gives his card to the staff)

Front Desk Staff: "Okay sir, here's your ID card, your key card, and your key-granting card. Please go into the Key-granting Staff right there to get your room key."

Hale Childeric: "That's... more convoluted than it should've been."

Front Desk Staff: "This is the Kerberos Hotel. We are special for implementing the Kerberos protocol, a protocol used for secure communication among computers, into a hotel."

Hale Childeric: "... But why though?"

Front Desk Staff: "Apparently it brings people in."

Hale Childeric: "... Okay... so, should I give all of these to that... uh... staff?"

Front Desk Staff: "Yes, sir. To the Key-granting Staff in front of the elevator on your back."

Hale Childeric: "Oh, okay then."

(Hale went to meet the Key-granting Staff)

Key-granting Staff: "Good afternoon sir, may I have your cards right there?"

Hale Childeric: "Here." (gives all the cards)

Key-granting Staff: "Okay sir, your room number is 8C3F, on floor 8C. Here is your room key, along with your one-time password."

Hale Childeric: "Oh okay. Thanks."

Jan 11, 2024, 2:33 PM
0