Discuss Scratch

79starce
Scratcher
6 posts

How do I import .mp4 files?

How do I upload an .mp4 file to scratch?

Last edited by 79starce (Dec. 19, 2024 21:11:40)

79starce
Scratcher
6 posts

How do I import .mp4 files?

there was a typo that's why I edited it
OldGuy111
Scratcher
19 posts

How do I import .mp4 files?

There isn't a real way to do that. What you can do is this:
A. EZGIF STEPS
1. Enter this site: https://ezgif.com/video-to-gif
2. Drag your MP4 file to the site.
3. Customize your settings:
  • Start time (seconds): self-explanatory.
    End time (seconds): self-explanatory. Limited by frame rate (see below).
    Size: GIF size in pixels. Smallest generally is AUTOx320.
    Frame rate (FPS): how many pictures on the screen per second. The more frames, the less time there is.
    Method: FFMPEG if doesn't have transparency, else use Preserve Transparency.
    Optimize for static background: Assigns more colors to moving parts of the image. Useful for static backgrounds, as the name implies.
4. Press Convert to GIF!
5. Wait a while.
6. Press Save.
7. Now on to Scratch!

B. SCRATCH STEPS
1. Open the project you want to put the video on.
2. Import the GIF file by hovering (not clicking) the Select a Sprite button (the one with a cat and a + sign) and then press the Upload Sprite button.
3. Select your GIF file.
4. Wait for it to import. Will take some time if you chose a big FPS or time period.
5. Put the following code:
your desired event :: events hat
set [fps v] to (your desired fps :: grey reporter)
wait ((1) / (fps)) secs
next costume
repeat until <(costume [number v]) = [1]>
wait ((1) / (fps)) secs
next costume
end
6. Set size and position accordingly.
7. Implement the code in your project.
8. Done!
BIG NOTE: this will increase the size of your project.
79starce
Scratcher
6 posts

How do I import .mp4 files?

Thank you so much! : D Also to get audio, (from YouTube for example) I use cobalt, and enter the link and make sure it's set audio, let's use https://www.youtube.com/watch?v=OhBfO33gVuU for example, now you should have a mp3 file, and just go to Sounds, and press Import Sound and done. If you're even going to look at this, here's the final result: https://scratch.mit.edu/projects/1112899876/

Last edited by 79starce (Dec. 20, 2024 01:12:20)

79starce
Scratcher
6 posts

How do I import .mp4 files?

The YouTube link has much more quality though.
IndyTheArtist
Scratcher
13 posts

How do I import .mp4 files?

thx

Last edited by IndyTheArtist (Sept. 13, 2025 16:17:28)

fishu4
Scratcher
100+ posts

How do I import .mp4 files?

cobalt stopped working. and cuz of how scratch works, it desyncs normally or if you lag
AHHH_SCREENDOOR
Scratcher
22 posts

How do I import .mp4 files?

IndyTheArtist wrote:

thx
please do not necropost
GoodboyzoomScratch
Scratcher
34 posts

How do I import .mp4 files?

You need to convert it into a gif
then convert the mp4 into mp3
No_Normal
Scratcher
100+ posts

How do I import .mp4 files?

OldGuy111 wrote:

There isn't a real way to do that. What you can do is this:
A. EZGIF STEPS
1. Enter this site: https://ezgif.com/video-to-gif
2. Drag your MP4 file to the site.
3. Customize your settings:
  • Start time (seconds): self-explanatory.
    End time (seconds): self-explanatory. Limited by frame rate (see below).
    Size: GIF size in pixels. Smallest generally is AUTOx320.
    Frame rate (FPS): how many pictures on the screen per second. The more frames, the less time there is.
    Method: FFMPEG if doesn't have transparency, else use Preserve Transparency.
    Optimize for static background: Assigns more colors to moving parts of the image. Useful for static backgrounds, as the name implies.
4. Press Convert to GIF!
5. Wait a while.
6. Press Save.
7. Now on to Scratch!

B. SCRATCH STEPS
1. Open the project you want to put the video on.
2. Import the GIF file by hovering (not clicking) the Select a Sprite button (the one with a cat and a + sign) and then press the Upload Sprite button.
3. Select your GIF file.
4. Wait for it to import. Will take some time if you chose a big FPS or time period.
5. Put the following code:
your desired event :: events hat
set [fps v] to (your desired fps :: grey reporter)
wait ((1) / (fps)) secs
next costume
repeat until <(costume [number v]) = [1]>
wait ((1) / (fps)) secs
next costume
end
6. Set size and position accordingly.
7. Implement the code in your project.
8. Done!
BIG NOTE: this will increase the size of your project.
name the costumes to numbers (1 - 1000 for example), and use this script instead:
reset timer
forever
switch costume to ([floor v] of ((timer) / (FPS))::operators)
end
this will deal with desyncing, makes much easier to do audio,
you can replace the forever to wait until timer > x

Last edited by No_Normal (Sept. 15, 2025 14:00:28)

MZC25
Scratcher
2 posts

How do I import .mp4 files?

All of the above doesn't work pls help
MZC25
Scratcher
2 posts

How do I import .mp4 files?

Sorry mistake

Last edited by MZC25 (Oct. 23, 2025 00:01:49)

Dandy_Tech
Scratcher
1 post

How do I import .mp4 files?

79starce wrote:

How do I upload an .mp4 file to scratch?
you cannot

Powered by DjangoBB