Old 12-01-2018, 09:53 AM   #1
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,416
Default Freeze frame preset...

I was surprised that this did not already exist among the stock presets, but then I had the opportunity to roll my own. And I'm quite satisfied that I managed it, though it is rather simple. I automate the freeze button to grab the exact frame I need to freeze.

It was useful to me, maybe can be useful for someone else.

Code:
// Freeze frame
// Freezes the frame current when the freeze button flips from 0 to 1
// If freeze == 0 && prev_frezze == 0, just blit out what comes in (is automatic)
// If freeze == 1 && prev_freeze == 0, grab and hold current frame, prev_freeze = 1
// if freeze == 1 && prev_freeze == 1, blit out held frame
// If freeze == 0 && prev_freeze == 1, blit out what comes in, prev_freeze = 0
//@param1:freeze 'freeze' 0 0 1 0.5 1

src = 0;
input_info(src,w,h) ? ( project_w = w; project_h = h; ); // preserve input dimensions

/*(freeze == 0 && prev_freeze == 0) ?
(
  // No need to do anything
):*/
(freeze == 1 && prev_freeze == 0) ?
(
  myhandle = gfx_img_hold(src); // grab the current frame
  prev_freeze = 1;
):
(freeze == 1 && prev_freeze == 1) ?
(
  //  gfx_dest = -1;
  gfx_blit(myhandle); // blit out the grabbed frame
):
(freeze == 0 && prev_freeze == 1) ?
(
  gfx_img_free(myhandle); // discard the grabbed frame
  prev_freeze = 0;
);
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 12-03-2018, 09:29 AM   #2
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,570
Default

thanks. not sure this the most efficient way to do freeze frame. I usually do it with editing. split at the frame I want, then set the item playrate to 0, and extend the item for length I need.
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is online now   Reply With Quote
Old 12-03-2018, 11:07 AM   #3
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,416
Default

Quote:
Originally Posted by EpicSounds View Post
thanks. not sure this the most efficient way to do freeze frame. I usually do it with editing. split at the frame I want, then set the item playrate to 0, and extend the item for length I need.
I guess that works as well. But if you want to freeze multiple frames to make a stutter kind of thing, automating the freeze knob comes in handy.

And regarding efficiency, here the difference in CPU% between enabling and disabling the video processor with this preset seems negligible.

But yeah... as always with Reaper, there are many ways to achieve the same thing
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 12-03-2018, 02:47 PM   #4
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,570
Default

Quote:
Originally Posted by Fabian View Post
And regarding efficiency, here the difference in CPU% between enabling and disabling the video processor with this preset seems negligible.
That's great. For some of my videos the layers of processors I use makes realtime playback impossible.


Quote:
Originally Posted by Fabian View Post
But if you want to freeze multiple frames to make a stutter kind of thing, automating the freeze knob comes in handy.
Sounds cool, I'll have to try that
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is online now   Reply With Quote
Old 12-04-2018, 12:10 AM   #5
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Fabian,

that was a great idea even if it seems simple. It works well and makes it very easy to stutter a video to a rhythm with LFO tool. Its also CPU friendly.

Many thanks.
Eliseat is offline   Reply With Quote
Old 12-04-2018, 01:52 AM   #6
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Hm, something does not work properly. It sometimes stops working and jumps back in time while the frame should be frozen. Then it doesn't freeze anymore. Have to take a closer look whats going on there. I will give you feedback soon.

Ah okay, I guess I have found the (user) error. If the LFO doesn't go max with the amplitude the frozen frame gets some kind of lost and the video goes on.

Here is a link to a short video I made to show the effect. Really great!
https://vimeo.com/304327698

Here a gif version:


Greetings
Eli

Last edited by Eliseat; 12-04-2018 at 02:54 AM.
Eliseat is offline   Reply With Quote
Old 12-04-2018, 10:58 AM   #7
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,416
Default

Quote:
Originally Posted by Eliseat View Post
Hm, something does not work properly. It sometimes stops working and jumps back in time while the frame should be frozen. Then it doesn't freeze anymore. Have to take a closer look whats going on there. I will give you feedback soon.

Ah okay, I guess I have found the (user) error. If the LFO doesn't go max with the amplitude the frozen frame gets some kind of lost and the video goes on.

Here is a link to a short video I made to show the effect. Really great!
https://vimeo.com/304327698

Here a gif version:


Greetings
Eli
Cool video! Nice

Ah! I see, there is something strange with automating the freeze button. It should be a toggle, on-off, but it doesn't behave like that. There's probably something I don't get (yet) about this. I'll see if I can fix it...

Thanks.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 12-04-2018, 11:16 AM   #8
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,416
Default

Hm. Even though the step of the freeze button is 1, and it toggles when moved manually with the mouse, when automated it can take any value between 0 and 1. And this is the case for toggles in all existing presets, it seems. For instance, automate any of the "field" parameters of the De-interlace preset, you see exactly the same behavior, automation can set it to any value between 0 and 1, but manually the parameters toggle.

This is definitely an unwanted "feature", if not a bug...

I don't see any workaround at the moment. I'll report it, we'll see what someone who knows better than me has to say.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 12-04-2018, 12:00 PM   #9
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Yes, I was surprised the preset didn't work properly because I expected the on/off LFO above 0.5 would be enough to push the freeze effect.

I'm glad I've found out about this strange behavior because a lot of people would have tried, getting frustrated and finally could have rejected the preset for this reason.
Eliseat is offline   Reply With Quote
Old 12-04-2018, 12:03 PM   #10
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,416
Default

Quote:
Originally Posted by Eliseat View Post
Yes, I was surprised the preset didn't work properly because I expected the on/off LFO above 0.5 would be enough to push the freeze effect.

I'm glad I've found out about this strange behavior because a lot of people would have tried, getting frustrated and finally could have rejected the preset for this reason.
Yes.
But note that this affects all toggles, not just for this preset.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 12-11-2018, 08:47 PM   #11
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 565
Default

Hey it is a great script! A little question, I have two videos in a project and want to freeze one of them. But After I place it in one of them, both are freezeed.
dsyrock is offline   Reply With Quote
Old 12-12-2018, 02:40 AM   #12
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

You have to put it on the video below the other as Reaper has no true video tracks. If you put an effect at the very top of the track stack it affects all videos coming thru. To avoid this, you should put the effect at the video below and let it come thru the top video track (or folder) by adjusting the opacity or by cutting the video items at those spots.



Eli
Eliseat is offline   Reply With Quote
Old 12-12-2018, 03:00 AM   #13
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 565
Default

Thanks. I thought because I choose "Items in lower number tracks replaces higher" in project settings, then I consider that I placed the video processor at the higher track should not affect the lower track.

I still not very understand the logic of the priority

EDIT: Oh damn! I misunderstanded about the concept about lower and higher, what a fool!

Last edited by dsyrock; 12-14-2018 at 12:14 AM.
dsyrock is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.