Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Video Editing/Mangling

Reply
 
Thread Tools Display Modes
Old 11-10-2018, 07:37 AM   #41
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

wwwmaze,

wouldn't it be a good thing to have video folders behaving the same as audio folders? I mean, imagine how easy it would be to handle title animations separately from scene transitions etc. It only needed a last instance like opacity to plan and organize everything.

But I'm still amazed by your presets. I downloaded SynfigStudio and made within a minute an own black and white transitions. That's so easy. You can practically do anything in 2d.

The other way to create nice alpha effects would be to use the "cheap brightness and contrast" preset with simple video snippets. Film some waves on a lake. Put it in Reaper. Choose the "cheap brightness" effect on it to desaturate and darken it until its nearly black. Then animate the contrast or brightness (extreme settings are possible) to make the transition to white.

So here is the quick synfigStudio test. Its a bit weird in timing but was made in a minute after first time opening this software. Now we see which powerful tool you have created.

Eliseat is offline   Reply With Quote
Old 11-10-2018, 07:57 AM   #42
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Just a few greyscale rectangles moving from left and right, getting bigger and brighter until everything is white.

Eliseat is offline   Reply With Quote
Old 11-10-2018, 11:19 AM   #43
sonicowl
Human being with feelings
 
sonicowl's Avatar
 
Join Date: Oct 2015
Posts: 739
Default

With alpha you can do tons of cool stuff. Really great that wwwmaze created those great presets. Kaleidoscope is amazing. Blending also. I'm amazed how helpful can one script be. I hope wwwmaze keeps writing great presets for video processor. Big thanx.
sonicowl is offline   Reply With Quote
Old 11-10-2018, 04:36 PM   #44
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

holy cow Eli these are some sweet transitions!

Quote:
Originally Posted by Eliseat View Post
wouldn't it be a good thing to have video folders behaving the same as audio folders? I mean, imagine how easy it would be to handle title animations separately from scene transitions etc. It only needed a last instance like opacity to plan and organize everything.
Yes thats what I was proposing, making video folders a bit more encapsulated. Preferable by a pair of functions to query the folder depth.

Pseudo-code:
PHP Code:
folderDepFX GetMyFolderDepth();  // get folder depth of this video processor
folderDepIn GetInputFolderDepth(input_track(0));  // get folder depth of input

folderDepFX==folderDepIn ? (
  
// do stuff
); 
In the meantime I modified the preset so that the user can define the track offsets from the FX to the input tracks by himself.
The default order hasn't changed: video-processor -> background -> foreground -> mask
PHP Code:
// Selective Blender
// v0.2
// blends parts of the foreground defined by the
// grey-level of a reference (mask) into the background
// 
// Default track-order (can be modified by offset parameters): 
// VideoProcessor - background - foreground - mask

//@param1:blend 'blend amount' 1 0 1 0.5 0.01
//@param2:mode 'blend mode' 0 0 19 0 1

//@param4:sub 'subtract?' 0 0 1 0 1

//@param10:offsBg 'track offset bg' 1 1 20 1 1
//@param11:offsFg 'track offset fg' 2 1 20 1 1
//@param12:offsMask 'track offset mask' 3 1 20 1 1

oldCS=colorspace;
colorspace='RGBA';

bg=input_track(offsBg-1);
fg=input_track(offsFg-1);
mask=input_track(offsMask-1);

gfx_blit(bg);

gfx_dest fsMask gfx_img_resize(fsMask,project_w,project_h);
gfx_blit(mask);

gfx_dest fsFg gfx_img_resize(fsFg,project_w,project_h);
gfx_blit(fg);

gfx_evalrect(0,0,project_w,project_h,
    
"a=max(0,min(255,0.2989*sr+0.5870*sg+0.1140*sb));",
    
0,fsMask);

gfx_dest=-1;
gfx_a=blend*(sub?-1:1);
gfx_mode=(sub?1:mode)|0x10000;
gfx_blit(fsFg);

colorspace=oldCS
To realize this layout
Quote:
Originally Posted by wwwmaze View Post
Code:
parent track* b
---background b
---parent track* a (= foreground b)
------background a
------foreground a
------mask       a
---mask       b
one would just have to set the mask track offset of video-processor b to 6. Just count all tracks with active video inputs (items or FX') at the current time.

Not very user-friendly but afaik there's no other choice currently.


Quote:
Originally Posted by Eliseat View Post
Choose the "cheap brightness" effect on it to desaturate and darken it until its nearly black. Then animate the contrast or brightness (extreme settings are possible) to make the transition to white.
Nice tips. You don't need to desaturate though, the preset automatically converts the mask image to greyscale by the equation specified at the bottom of this page: https://www.mathworks.com/help/matlab/ref/rgb2gray.html

You basically just can use another video as mask.
wwwmaze is offline   Reply With Quote
Old 11-10-2018, 04:36 PM   #45
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

Quote:
Originally Posted by sonicowl View Post
With alpha you can do tons of cool stuff. Really great that wwwmaze created those great presets. Kaleidoscope is amazing. Blending also. I'm amazed how helpful can one script be. I hope wwwmaze keeps writing great presets for video processor. Big thanx.
thx for the kind words sonic. Don't forget that you guys mostly had these great ideas.
wwwmaze is offline   Reply With Quote
Old 11-10-2018, 04:52 PM   #46
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,562
Default

a way to desaturate the dark areas would be nice. Sometimes I'll do a rough color adjustment and end up with blue or purple dark areas but I'd like them to stay black. In color grade software this would be "Luma vs Sat"
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 11-14-2018, 07:53 AM   #47
Mordi
Human being with feelings
 
Mordi's Avatar
 
Join Date: May 2014
Location: Norway
Posts: 982
Default

This is really cool. I see this as a great leap for the video capabilities of Reaper. Great job folks!
Mordi is offline   Reply With Quote
Old 11-14-2018, 04:25 PM   #48
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,716
Default

Quote:
Originally Posted by EpicSounds View Post
a way to desaturate the dark areas would be nice. Sometimes I'll do a rough color adjustment and end up with blue or purple dark areas but I'd like them to stay black. In color grade software this would be "Luma vs Sat"
You could easily do this with gfx_evalrect()...
Justin is offline   Reply With Quote
Old 11-15-2018, 04:03 AM   #49
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

One last thing I wanted to show just to present whats possible with masks now.





This is only a campfire at night. I put it on the video b track and in the mask track without any manipulation. So the mask channel just uses the black and white data to only let the flames get thru. This way you could use snow, rain etc. in front of a black background to mix it in your videos. Very nice.

Lots of free campfires to test out: https://vimeo.com/93091275

Eliseat is offline   Reply With Quote
Old 11-15-2018, 03:45 PM   #50
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

This is a neat trick. The fire at the ridge actually looks pretty realistic.
I was thinking about for that it would be handy to have some additional parameters to stretch/compress/boost the histogram/contrast of the mask, but then decided it would be best done as separate FX ahead of the input.
wwwmaze is offline   Reply With Quote
Old 11-16-2018, 01:00 AM   #51
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Stretch-compress the histogram ... sounds pretty exciting. I'm coming from Photoshop where this is the first thing you have to do with every new picture: Arranging the levels to get the widest range.

So I hope you get bored and nothing special happens in your next free time.

Eliseat is offline   Reply With Quote
Old 05-13-2020, 08:49 PM   #52
KeithHandy
Human being with feelings
 
Join Date: Mar 2018
Posts: 14
Default

Quote:
Originally Posted by wwwmaze View Post
Either press F1 when the mouse cursor is within the editor or use this online documentation: https://mespotin.uber.space/Mespotin...API_Video.html
Heads up, that link seems to be broken by now, but Googling for the quoted part brings me to a similar but shorter URL: https://mespotin.uber.space/Ultrasch...mentation.html
KeithHandy is offline   Reply With Quote
Old 11-22-2020, 03:54 PM   #53
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,264
Default

This is a pretty old thread, but I've been referencing quite a bit, and it has been very helpful. That initial blender thing (post #15) is something I've wanted for quite a while. Took me a minute to figure out how to make it work, and I've got some ideas for improvement that I'm going to work on here in a bit. I did find that this:
Quote:
Originally Posted by wwwmaze View Post
Every track below a video-processor FX (or above, depending on project settings), containing a video item at the current play time, can be referenced by this processor by an index starting from 0. This index strictly increases as we go down no matter if a track is in a folder or not.
A track with a video-processor FX is also considered a video track and gets its own index.
Is not exactly true, or at least comes with a caveat. I had a folder with 5 tracks in it, but in order to get past it (to mix it with another folder further down), I had to use index 16. This seems to be because there were FX on those tracks and some of those FX internally create new image indexes. I haven't exactly worked out why it totalled 15 in this particular case, but it's something to keep in mind. Those indexes are not necessarily Reaper tracks, but rather image spaces or whatever.
ashcat_lt is offline   Reply With Quote
Old 12-11-2020, 07:00 AM   #54
leafac
Human being with feelings
 
leafac's Avatar
 
Join Date: Sep 2020
Location: Portugal
Posts: 110
Default

I learned a lot from reading this thread and came up with a few tricks of my own, for example, using a mask to add rounded corners to an overlay (picture-in-picture). I compiled everything in this video:



Thank you all for your work 😀
leafac is offline   Reply With Quote
Old 09-09-2021, 01:23 PM   #55
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Thanks for this preset!

I recently worked with a yuva420p-encoded video with transparency, but REAPER doesn't seem to recognize the alpha channel. To solve the problem, I extracted the alpha channel to a separate greyscale mask, and then used this preset to apply the mask as transparency.

I noticed that the preset doesn't seem to work if it is on the same track as one of the layers. I don't know much about video scripting, but the following hack seems to work:
Code:
//@param10:offsBg 'track offset bg' 1 0 20 10 1
//@param11:offsFg 'track offset fg' 2 0 20 10 1
//@param12:offsMask 'track offset mask' 3 0 20 10 1

bg=(offsBg==0)?0:input_track(offsBg-1);
fg=(offsBg==0)?0:input_track(offsFg-1);
mask=(offsMask==0)?0:input_track(offsMask-1);
juliansader is offline   Reply With Quote
Old 02-27-2023, 09:54 AM   #56
daeavelwyn
Human being with feelings
 
daeavelwyn's Avatar
 
Join Date: Dec 2014
Posts: 597
Default

Hi folks,

is it possible to apply the mask only to a portion of the screen ? I need to create a lower third animation and I'd like to mask only a very few part of the screen.

Some width /height x/y options ?

Any workaround ?
daeavelwyn is offline   Reply With Quote
Old 02-27-2023, 10:34 AM   #57
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 673
Default

Quote:
Originally Posted by daeavelwyn View Post
Hi folks,

is it possible to apply the mask only to a portion of the screen ? I need to create a lower third animation and I'd like to mask only a very few part of the screen.

Some width /height x/y options ?

Any workaround ?
I made a polygon template preset that can do that. You define a series of arbitrary shape polygons to cover parts of your screen (any color will do), then crank up the "a2 = alpha2" parameter to 100% and finally feed this to "Image overlay". It creates a transparency layer over your source.

Here is thread: https://forum.cockos.com/showthread.php?t=270737
papagirafe is offline   Reply With Quote
Old 02-27-2023, 02:35 PM   #58
daeavelwyn
Human being with feelings
 
daeavelwyn's Avatar
 
Join Date: Dec 2014
Posts: 597
Default

Hello Papagirafe !

thanks for your anwser, but unfortunately, I can't acheive my project even with this preset.

I'd like to make the same animation than this one : https://www.youtube.com/watch?v=KEjZH1PRYPk

I wonder if it was possible do do it in Reaper, but for now it seems to not be possible, at least easily.

Nevermind, Kdenlive is a quite good tool
daeavelwyn is offline   Reply With Quote
Old 02-27-2023, 03:53 PM   #59
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 673
Default

Quote:
Originally Posted by daeavelwyn View Post
Hello Papagirafe !

thanks for your anwser, but unfortunately, I can't acheive my project even with this preset.

I'd like to make the same animation than this one : https://www.youtube.com/watch?v=KEjZH1PRYPk

I wonder if it was possible do do it in Reaper, but for now it seems to not be possible, at least easily.

Nevermind, Kdenlive is a quite good tool
I did not get as clearly as now what you are looking for. I don't see this type of animation as rocket science in Reaper. I think you should start a new thread specifically for that as it is diverging quite a bit from the orginal thread intent. This animation could be built in Reaper with the same number of tracks with "overlay image" for each different object (text, circle etc...) and a few horizontal wipes as well.
papagirafe is offline   Reply With Quote
Old 03-02-2023, 02:29 PM   #60
daeavelwyn
Human being with feelings
 
daeavelwyn's Avatar
 
Join Date: Dec 2014
Posts: 597
Default

Quote:
Originally Posted by papagirafe View Post
I did not get as clearly as now what you are looking for. I don't see this type of animation as rocket science in Reaper. I think you should start a new thread specifically for that as it is diverging quite a bit from the orginal thread intent. This animation could be built in Reaper with the same number of tracks with "overlay image" for each different object (text, circle etc...) and a few horizontal wipes as well.
Ok, thanks for your answser, I gonna start a new thread
daeavelwyn 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 03:42 AM.


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