12-01-2018, 09:53 AM | #1 |
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,417
|
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... |
12-03-2018, 09:29 AM | #2 |
Human being with feelings
Join Date: Jul 2009
Posts: 7,571
|
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
|
12-03-2018, 11:07 AM | #3 | |
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,417
|
Quote:
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... |
|
12-03-2018, 02:47 PM | #4 | |
Human being with feelings
Join Date: Jul 2009
Posts: 7,571
|
Quote:
Sounds cool, I'll have to try that
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
|
|
12-04-2018, 12:10 AM | #5 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
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. |
12-04-2018, 01:52 AM | #6 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
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. |
12-04-2018, 10:58 AM | #7 | |
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,417
|
Quote:
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... |
|
12-04-2018, 11:16 AM | #8 |
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,417
|
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... |
12-04-2018, 12:00 PM | #9 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
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. |
12-04-2018, 12:03 PM | #10 | |
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,417
|
Quote:
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... |
|
12-11-2018, 08:47 PM | #11 |
Human being with feelings
Join Date: Sep 2018
Location: China
Posts: 565
|
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.
|
12-12-2018, 02:40 AM | #12 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
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 |
12-12-2018, 03:00 AM | #13 |
Human being with feelings
Join Date: Sep 2018
Location: China
Posts: 565
|
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. |
Thread Tools | |
Display Modes | |
|
|