Reordering a chopped-up video (crop images from frames)

Hi, I’m a total noob at Processing.

I presume this is possible but it would be good to have it confirmed before I start. :slightly_smiling_face:

I want to cut rectangles from random frames in an existing video to construct a new video.

For example if I have a 1000x500px video with 100 frames; for frame 1 of my new video I want the top left rectangle (500x250px) to be from a random frame (e.g frame 77) of the referenced video, then the top right rectangle to be from another random frame (e.g frame 23), etc with the bottom left and right rectangles. That is for frame 1, then repeat with frame 2 etc until I’ve build up my new (chopped and reordered) 100 frame video.

So I guess this boils down to…
1 can I access individual frames from a video?

2 And can I cut and paste from that frame into a new frame/ image, and paste from another different frame into the same image?

Many thanks :blush:

1 Like

Yes, we can

Check out: Movie::play() \ Language (API) \ Processing 3+

Hey, and welcome to the forum!

Great to have you here!

Warm regards,

Chrisir

Hi Chrisir,

Thanks for the warm welcome and reply!

Great, good to know, and thanks for the link, it would have taken a long time to find the specific library.
I see that in here…
processing.org/reference/libraries/video/Movie_jump
you can jump to a section by specifying seconds; is there a way to jump to a specific frame instead/ advance frame by frame?

Many thanks

Mat

I don’t know.

Did you try to, I don’t know, gather all images from the movie in an array ?

Good tip thanks, I’ll give it a go…

Thanks

1 Like