PDA

View Full Version : 'VHS-effect' is this possible?


Winfield
12-04-2018, 08:38 AM
Hi there, great to see all the video love Reaper gets atm - and a dedicates video-forum to boot!

I'm looking for a 'VHS-effect' like in the first few seconds of this video
https://www.youtube.com/watch?v=qQY6jXEhXls

Is it possible in reaper (or at all?)

Thank you
-W

EpicSounds
12-04-2018, 09:03 AM
basically you get stock assets that have those glitches (often with solid grey or green background) and overlay them your video.

One example where I've done this is from a vlog


https://youtu.be/CqwaXFQh4x0

CqwaXFQh4x0


The beginning and end static noise is playing alone, through the train part there is a different glitch asset with 'simple source chroma key' preset used to remove the green background.

Eliseat
12-04-2018, 12:33 PM
There are great tutorials of how to create this effect in Blender. The used nodes could be a perfect helper to recreate something similar in Reaper. Here for example: https://www.youtube.com/watch?v=7qitRVr56Cs

And the output looks awesome.

You can of course add some of this typical VHS noise with overlay or color key but its not possible to recreate color shift and horizontal distortion with that method as the source material needs to get manipulated with the noise. I'm sure this could be done in video processor. The color shift effect was already requested somewhere. (Edit: Haha, it was you Winfield! :) Click here!) And the needed wavy distortion doesn't look to complicated. Maybe this effect could be created by using a horizontal color noise overlay, color shift and wavy distortion presets together?

If I get time I will make a test noise overlay like in the blender tutorial to share here for further testing.

Eli :)

EpicSounds
12-04-2018, 05:16 PM
OK decided to have another go at making RGB Layers using Justin's new color correction script. It's pretty clunky but much better result than the previous time I tried.

https://youtu.be/I5t89JzoE84

I5t89JzoE84


Here I'm using 3 layers of same video with a slight X and Y position shift on middle and bottom layers. Each layer has R, G, or B isolated. The R and B layers have what I've saved as 'lighten/screen overlay'. Without the position shift the video looks normal.

img1=0;
img2=input_track(0);
gfx_blit(img2);

gfx_mode = 1;
gfx_blit(img1,0);


And then above that I have a tracking error stock with green keyed out.

Winfield
12-05-2018, 09:49 AM
Thanks a lot for the suggestions!
EpicSounds, that second one looks good - but yeah a bit clunky, but doable.
Eliseat -Yeah that was me :) That 'blender effect' looke really good - -ow I suggest you take some time off, you know, relax and test the noise overlay thingy etc. ;)

-W

Eliseat
12-05-2018, 10:22 AM
OK decided to have another go at making RGB Layers using Justin's new color correction script. It's pretty clunky but much better result than the previous time I tried...

Here I'm using 3 layers of same video with a slight X and Y position shift on middle and bottom layers. Each layer has R, G, or B isolated. The R and B layers have what I've saved as 'lighten/screen overlay'. Without the position shift the video looks normal.

img1=0;
img2=input_track(0);
gfx_blit(img2);
gfx_mode = 1;
gfx_blit(img1,0);

And then above that I have a tracking error stock with green keyed out.


Seems like you only posted part of the code because it doesn't work. But that's a really promising start. Now some noise and horizontal strikes and it rocks VHS. :)

Tomorrow I will take a look at how to create the noise overlay in Blender. I've found a node preset with an absolutely stunning VHS illusion. Take a look at this.

7qitRVr56Cs

Those are the cleanest render outputs from Blender running thru the post processing VHS nodes. Feels like 1988! :) Amazing.

Eliseat
12-06-2018, 09:27 AM
Hi,

I tried to recreate the old VHS noise. The tutorials weren't as helpful as expected because they all use distortion and color shift. So I did it myself (not in a sexual manner ;)) and combined extreme low color noise (30px) with fine (2px), vertical streaking (18px,2px) and white vertical streaking noise (30px,5px). It doesn't look as good as expected because only noise just isn't enough. But combined with rgb-shift this could be something usable.

Here is an example:

https://i.ibb.co/yVBg8Bv/VHS-noise-example.gif


And here is a screenshot of how I set up the project.

https://i.ibb.co/zJLmzS5/Bild-2018-12-06-17-12-04-961.jpg

As you can see I had to blur the image. I also used a vignette to make the noise more present at the edges. wwwmaze's blend preset was used to blend it over (mode 2). I will upload the noise video shortly. Link will be added! :)

Greetings
Eli

Eliseat
12-06-2018, 09:54 AM
So, here is the link. Hope it works as I just created a Mega account for the first time.

https://mega.nz/#!C6pQ2YyL

https://mega.nz/#!C6pQ2YyL!IvfAGVe98bliOrUl73KoTUDVtaN1PohdMLdVnwD E4Mg

Edit: Doesn't work. Have to check the settings again.

Got it!


:)

Btw: I just watched the example in the first post again and realized that the white horizontal streaks need to be muuuch more present and stretched horizontally. Will make some adjustments and post a new version of color noise.

EpicSounds
12-06-2018, 01:01 PM
img1=0;
img2=input_track(0);
gfx_blit(img2);
gfx_mode = 1;
gfx_blit(img1,0);

I didn't leave anything out of the code but the title. I got it from a thread here a few months ago. put it on a clip with black background and it will overlay everything but the black areas on your footage on track below.

example
https://youtu.be/H96BedR-xbo


also works if you want to do hand-written text. write on white paper with black marker, video/photo it. Invert color preset + lighten/screen overlay preset to make white text with transparent background.

Eliseat
12-06-2018, 02:11 PM
That was a misunderstanding. I thought you had a preset to shift the RGB values. :)

I read again and now I got it. You used this black overlay preset to shift the separated colors. Will try that.

Many thanks

Edit: This preset is kind of a simple version of wwwmaze's blend preset. And you can change the blend mode inside the code. Nice and simple! :)

Eliseat
12-06-2018, 04:18 PM
Here is another try with more white streaks. Preview tomorrow as I'm to tired now.

Timing is a bit to fast. Needs more randomness.

https://mega.nz/#!iuoCnYKD!e8VCWfF93YqRcDV1CpcsidUScOjOgcMyDD83_ia GiUI

EpicSounds
12-06-2018, 04:55 PM
that looks pretty good to me

Eliseat
12-07-2018, 02:44 AM
Two more links:
https://mega.nz/#!KjBHwaYQ!Z_-fbPdZTMIzLrg3bPKVFO_oZi_owYh0Ow1Vs2WQbbw
https://mega.nz/#!G2JHAChC!uP_ETjlBqU9q8bM-BxKg9W_49d053biPz9Lt-f9nQO4

One more example:

https://i.ibb.co/DCV0Ndn/VHS-noise-02-example.gif

Made the streaks more random (cloud texture) and the distorted horizontal lines slower. Last three overlays are 8 seconds long (240f) and should be looping as I made the vertical translation of the lines 40, 60, 80, or 120 f long.

:)

Eliseat
12-07-2018, 07:03 AM
I have a general question about the still needed color offset effect. In Blender this is done by separating the RGB channels, translating (offsetting) red, green and blue and combining and finally adding them to the source video. (blend mode add)
We already have panning or offsetting presets, and we also have a RGB preset. But would it be even possible to put them together in one preset by using just one video input? The problem is that alpha or transparency seems to only work with colors drawn over the source or with a second track beyond shining thru. Not using the same source to blend in manipulated. (As seen in the colorize preset which doesn't have a blend/alpha.)

I imagine (with my lack of programming skills) there should be the definition of two inputs with the same source. "input a" = "track 1" and "input b" = "track 1". "Input b" then should be separated in RGB, get offset every color channel and finally get mixed (mode 1?) with "input a".

Would this be possible or is there a limitation in the programming language or even the concept of using sources?

Hope someone can explain as I tumbling in the darkness. :)

Many thanks

Justin
12-15-2018, 08:27 PM
Here's a preset:
//RGB decompose
//@param 1:r.x "red x offset" 0 -100 100 0 1
//@param 2:r.y "red y offset" 0 -100 100 0 1
//@param 3:g.x "green x offset" 0 -100 100 0 1
//@param 4:g.y "green y offset" 0 -100 100 0 1
//@param 5:b.x "blue x offset" 0 -100 100 0 1
//@param 6:b.y "blue y offset" 0 -100 100 0 1

gdf=g.x != r.x || g.y != r.y;
bdf=b.x != r.x || b.y != r.y ? b.x != g.x || b.y != g.y ? 2 : 1;

function f(cp,r,g,b,x,y,w,h) local(tmp) global() (
cp ? gfx_set(0,0,0,1,0, tmp = gfx_img_resize(tmp,w,h))
: x||y?gfx_fillrect(0,0,w,h);

gfx_blit(0, 0, cp?:x, cp?:y, w,h, 0,0,w,h);
gfx_set(r,g,b,-1,1);
r+g+b ? gfx_fillrect(0,0,w,h);
gfx_set(0,0,0,1,1,-1);
cp ? gfx_blit(tmp,0, x,y, w,h,0,0,w,h);
);

colorspace='RGBA';
input_info(0,project_w,project_h);

f(0, 0,gdf,bdf!=0,r.x,r.y,project_w,project_h);
gdf ? f(1, 1,0, bdf!=1,g.x,g.y,project_w,project_h);
bdf>1 ? f(1, 1,1, 0, b.x,b.y,project_w,project_h);


It's perhaps a little more complicated than it needs to be, for the optimization of the cases where some of the three channels are aligned...

EpicSounds
12-15-2018, 09:27 PM
its simpler than what I had. You can get very different results from the various blend modes if using this as an 'adjustment layer'.

mode 1 between 30 and 60% opacity looks good to me.

Eliseat
12-16-2018, 08:10 AM
Many thanks for the Color Offset. :)

With cheap blur, color offset and noise overlay it looks pretty close to old VHS recordings. Only thing left is wavy distortion.

https://i.ibb.co/1fyCFwF/vhs-example.gif

Eliseat
12-16-2018, 08:18 AM
For comparison:

https://i.ibb.co/HVrN56K/Bild-2018-12-16-16-12-55-612.jpg

Justin
12-16-2018, 09:34 PM
Here's an optimized RGB decompose that uses a special LICE blend mode (undocumented in reaper_video, documented in lice.h):


//RGB decompose (fast undocumented version)
//@param 1:r.x "red x offset" 0 -100 100 0 1
//@param 2:r.y "red y offset" 0 -100 100 0 1
//@param 3:g.x "green x offset" 0 -100 100 0 1
//@param 4:g.y "green y offset" 0 -100 100 0 1
//@param 5:b.x "blue x offset" 0 -100 100 0 1
//@param 6:b.y "blue y offset" 0 -100 100 0 1

gdf=g.x != r.x || g.y != r.y;
bdf=b.x != r.x || b.y != r.y;

colorspace='RGBA';
input_info(0,project_w,project_h);

gfx_fillrect(0,0,project_w,project_h);
!gdf || !bdf ? gfx_blit(0) : (
gfx_mode=0xfa; gfx_blit(0,0, r.x,r.y);
);
gdf ? (gfx_mode=0xf5; gfx_blit(0,0, g.x,g.y) );
bdf ? (gfx_mode=0xf0; gfx_blit(0,0, b.x,b.y) );

Eliseat
12-17-2018, 01:47 AM
Thanks.

This indeed works very fast but for some reason it switches to kind of a U or V channel display as long as I offset red or green. Blue does not behave like that as it just moves the blue channel aside as expected and leaves the rest untouched. Is it supposed to be like that?

Many thanks

Justin
12-17-2018, 08:23 AM
Ooops there was a typo, 0xf8 was meant to be 0xfa. Fixed!

Eliseat
12-17-2018, 08:49 AM
Amazing. :)

Many thanks for all this cool stuff.

Winfield
12-17-2018, 02:33 PM
Woohoo, the 'RGB decompose' was the filter I was looking for in in another thread - just set the offsets higher (eg 2000).
Also great for the VHS effect.

Very nice - Great success!

-W

wwwmaze
12-19-2018, 09:01 PM
Caution: some big gifs in this post

Only thing left is wavy distortion.


I gave it a try Eli and it wasn't actually that hard :)
https://i.imgur.com/MVxrwBb.gif

// wave morph
// v0.1

//@param1:type 'function (see code)' 0 0 4 2 1 // 0=sine 1=square 2=saw 3=reverse saw 4=triangle
//@param2:amt_n 'amount' 0.1 0 1 0.5
//@param3:ph 'phase' 0 0 1 0.5

//@param6:nPer 'n half-periods' 2 1 100 50 1
//@param7:vert '0=horz 1=vert' 0 0 1 0.5 1
//@param8:bbx 'bounding box' 0 -1 1 0 1


in=0;
amt=(vert?project_w:project_h)*amt_n/2;

input_info(in,inW=project_w,inH=project_h);


bbx==1 ? (
vert ? (
dstH=inH;
dstW=inW-2*amt;
):(
dstH=inH-2*amt;
dstW=inW;
);
offs=amt;
):bbx==-1 ? (
vert ? (
dstH=inH;
dstW=inW+2*amt;
):(
dstH=inH+2*amt;
dstW=inW;
);
offs=-amt;
):(
dstH=inH;
dstW=inW;
offs=0;
);
project_w=dstW;
project_h=dstH;

gfx_set(0,0,0,1);
gfx_fillrect(0,0,dstW,dstH);

i=0;
len=vert?inH:inW;
div=2*len/nPer;
while(i<len) (
i_n=((i+ph*div)%div)/div;
fun=type==0 ? sin(i_n*2*$pi)
:type==1 ? i_n<0.5?-1:1
:type==2 ? -1+2*i_n
:type==3 ? 1-2*i_n
:type==4 ? i_n<0.5?-1+4*i_n:3-4*i_n;
fun=fun*amt-offs;
vert ?
gfx_blit(in,0, fun,i,inW,1, 0,i,inW,1)
:
gfx_blit(in,0, i,fun,1,inH, i,0,1,inH);
i+=1;
);


You can also make other funny things with it, e.g. enhance a static image of water:
https://i.imgur.com/F4Iat1t.gif

EpicSounds
12-19-2018, 11:46 PM
"I gave it a try Eli and it wasn't actually that hard "

took me a while but I think I figured out your settings for a subtle effect like in your gif

function 1
amount 0.0015
phase automated with saw shape from 1 to 0 1 cycle per second
n half-periods 1
vertical
bounding box 1

so easy to go overboard with this. Really cool! nice work!

Eliseat
12-19-2018, 11:56 PM
What the ... :D

The wizard comes back to the shire. And everyone is happy when he appears. He does lots of fireworks and shows magic things. (This doesn't only belong to Gandalf ;)) :)

I have to make tests.

Thank you so much.

Eliseat
12-20-2018, 01:48 AM
Function (see code) Are you serious? :) I can't see anything. (Thought there would be some nice comments or greetings. No, just cryptic signs and math.)

Funny (weird) thing is, I stumbled upon a video in another thread right after I copied your code into the video processor. It was about electronic drum beats. So I listened to the band and got in conflict with myself. Did I just see the same effect that wwwmaze has posted here in that music video?

Yes, I did. :D

AfuCLp8VEng

The preset works great though I can't preview it in Reaper. But this gives us a lot more possibilities. Its another huge leap for video processing in Reaper.

This is just awesome.
Many, many thanks. :)

wwwmaze
12-20-2018, 07:58 PM
lol calm down everybody :D

@Jon yes sry I forgot to post my settings, glad you figured it out anyway (the second gif is just a couple of chained presets with random-sized sines, vertical and horizontal and, again, parameter-modulated phases)

@Eli
Its a bit hard to see but the function types are explained on line 4. You probably figured them out by now: sine, square, saw, reversed saw, triangle.

Unfortunately some of the stuff in the video isnt possible with the current preset (single sizeable periods etc). I have the rewritten preset done but need to fix (a lot of) bugs and optmize a bit first.

Ruxton
01-03-2019, 06:36 AM
Thanks for all the info/presets/stock peeps.

I was chasing this effect when I did a video back in June last year. Seeing all your posts made me go back and revisit it. Here's the outcome:

https://www.youtube.com/watch?v=Yx6_7J0zz3k
Yx6_7J0zz3k

Nothing but REAPER, The Simpsons, the stock footage and presets from this thread and another video for the play overlay.

This is the original from back in June, just for comparison:
https://www.youtube.com/watch?v=9uNdYtBwxd4

Eliseat
01-03-2019, 08:48 AM
Nice to see the outcome of this thread. And I can easily imagine that this rendering took some time. ;)

I will post some more (and better) noise loops soon, and I also created some weird new distortions with wwwmaze's warp preset. :)

David Else
04-05-2019, 05:15 AM
Hi, I see the RGB decompose is now built into Reaper, but I can't find the cool VHS emulation that uses is... is there a link? Cheers.

Nantho
05-03-2019, 04:42 AM
Hello everybody !

Just a quick message to thank you all for this thread :)

Here is a little video I've made using your different video tricks :

https://www.instagram.com/p/Bw_6_YJoPwT/?utm_source=ig_web_copy_link

It was a lot of fun to do ^^

Eliseat
05-03-2019, 09:13 AM
Great idea, funny interpretation AND nice transfer of the given video effects. Well done! :)

mawi
05-03-2019, 08:59 PM
it still looks fake.

Eliseat
05-04-2019, 01:40 AM
The achievement isn't to have a one to one copy of VHS. Because this would mean lots of blur and a very tiny resolution. There also is not THE one and only VHS effect because there are lots of variations from noisy to blurred, destroyed tape, bad signal and so on.

Its just that the side effects can be used to make videos more interesting and less boring. And you could use it to recreate VHS very close. (If needed!)

So everything is fine. :)