Discuss Scratch

teije9
Scratcher
76 posts

upload a video

how to upload a video to a sprites costume? i used to be able to do it and then it added all the frames as costumes but now it doesnt work
Socialix
Scratcher
1000+ posts

upload a video

You can't. You can upload a GIF file (if it's not too big) and put this code in:
when green flag clicked
switch costume to [shrek1 v] // first costume of GIF file
forever
wait (0.1) secs // test if the wait goes well
next costume
end

EDIT: I might be wrong, but see if the MP4 file is too big.

Last edited by Socialix (Feb. 17, 2021 08:16:01)

teije9
Scratcher
76 posts

upload a video

Socialix wrote:

You can't. You can upload a GIF file (if it's not too big) and put this code in:
when green flag clicked
switch costume to [shrek1 v] // first costume of GIF file
forever
wait (0.1) secs // test if the wait goes well
next costume
end

EDIT: I might be wrong, but see if the MP4 file is too big.
wait 0.1 seconds is bad you should put wait () that makes it go every frame

Last edited by teije9 (Feb. 17, 2021 08:23:51)

Flowermanvista
Scratcher
1000+ posts

upload a video

@Socialix: You are correct that you can't import MP4 files into Scratch.

@teije9: If you're more technically inclined, I have a much better way of putting videos in a project. Let me know if you want to know more - alternatively, I can do it for you.

(Note that the following is my signature - it appears automatically below all of my posts. You can tell where a post ends and where a signature starts because there is a grey line separating them. You can put anything you want in a signature - including advertisements for your projects or forum topics. To get your own signature, follow the instructions here.)
teije9
Scratcher
76 posts

upload a video

Flowermanvista wrote:

@Socialix: You are correct that you can't import MP4 files into Scratch.

@teije9: If you're more technically inclined, I have a much better way of putting videos in a project. Let me know if you want to know more - alternatively, I can do it for you.

(Note that the following is my signature - it appears automatically below all of my posts. You can tell where a post ends and where a signature starts because there is a grey line separating them. You can put anything you want in a signature - including advertisements for your projects or forum topics. To get your own signature, follow the instructions here.)
i want to know more i cant rickroll with a 10 sec video
dertermenter
Scratcher
1000+ posts

upload a video

teije9 wrote:

Flowermanvista wrote:

@Socialix: You are correct that you can't import MP4 files into Scratch.

@teije9: If you're more technically inclined, I have a much better way of putting videos in a project. Let me know if you want to know more - alternatively, I can do it for you.

(Note that the following is my signature - it appears automatically below all of my posts. You can tell where a post ends and where a signature starts because there is a grey line separating them. You can put anything you want in a signature - including advertisements for your projects or forum topics. To get your own signature, follow the instructions here.)
i want to know more i cant rickroll with a 10 sec video
I do not want to advertise, but I have a rickroll in my platformer gamehere


It has a gif image of Rick and also the audio. Feel free to backpack and use it but with credit.
s216654
Scratcher
69 posts

upload a video

You should put
wait (0) secs
Flowermanvista
Scratcher
1000+ posts

upload a video

teije9 wrote:

Flowermanvista wrote:

i want to know more i cant rickroll with a 10 sec video
OK.

The process involves converting the video into a series of images by using a command-line program called ffmpeg, an extremely versatile video encoder/decoder/remuxer/processor that supports about 2 billion different formats*. Then, I import the images into Scratch and use a simple loop to play them.

While this provides much better quality and much more control than a GIF, it does still come with a catch: due to Scratch's horrendous memory management, your videos can't be too long, or you will run out of memory - for full resolution and framerate, this is about 15 seconds (480x360, 30 fps), although you can get longer videos with lower resolutions or framerates.

Would you still like to know more? Alternatively, would you like me to help you put a video in your project?

*Exaggeration for comic effect, but no joke, I think the number of formats it supports is somewhere around 300.

Last edited by Flowermanvista (Feb. 18, 2021 14:35:16)

teije9
Scratcher
76 posts

upload a video

dertermenter wrote:

teije9 wrote:

Flowermanvista wrote:

@Socialix: You are correct that you can't import MP4 files into Scratch.

@teije9: If you're more technically inclined, I have a much better way of putting videos in a project. Let me know if you want to know more - alternatively, I can do it for you.

(Note that the following is my signature - it appears automatically below all of my posts. You can tell where a post ends and where a signature starts because there is a grey line separating them. You can put anything you want in a signature - including advertisements for your projects or forum topics. To get your own signature, follow the instructions here.)
i want to know more i cant rickroll with a 10 sec video
I do not want to advertise, but I have a rickroll in my platformer gamehere


It has a gif image of Rick and also the audio. Feel free to backpack and use it but with credit.
“thnx for @dertermenter for the rickroll gif”

Powered by DjangoBB