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

Reply
 
Thread Tools Display Modes
Old 06-02-2020, 06:50 AM   #1
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default Video to Circle video processor plugin (edit)

Hi Reaper video enthusiasts,

I kind of manged to edit an older script to create a circle out of the video signal. read (<- its the name), asked for something like that for music visualization. To be honest, its a poor approach because I just rounded some parameters by eye to fit the conditions. But it is usable and maybe someone jumps up and tries to code the same thing in a much simpler and clearer version. Vitalker suggested to make a new thread for it.

Here is the code:
Code:
//Video to Circle 
//@param1:cstart 'circle start' 1 0 1 1
//@param2:panhoz 'pan horizontal' 1.3 -0.65 3.3 0
//@param3:panhor 'pan vertical' .22 -1 1.5 0
//@param4:zoom 'zoom' 1.4 -1 5 0
//@param5:squvert 'squeeze vert' 1.55 -5 5 0
//@param6:squhor 'squeeze hor' 2.7 -5 5 0

input_info(0,w,h);
y=tab=0; 
tabsz=90;
loop(tabsz,
  x=0;
  loop(tabsz,
    dx = x/tabsz-panhoz;
    dy = 1-y/tabsz-panhor;
    ang = atan2(dx,dy);
    dist = (sqr(dx)+sqr(dy));
    z= ((ang-$pi/cstart)*w*.5)/$pi;
    z<0?z+=w;
    tab[]=z;
    tab[1] = h-(dist*h/(.5^2+1))*zoom;
    
    tab+=2;
    x+=squhor;
  );
  y+=squvert;
);
tab=0;
gfx_mode=0x100;
gfx_fillrect(0,0,project_w,project_h);
gfx_xformblit(0, 0,0,project_w,project_h,tabsz,tabsz,tab,0);
Put it afterwards the oscilloscope to create a circle out of it. Put the mirror or kaleidoscope after both and you get very unique and unexpected oscillating for music stream etc.

Here are examples:
Video with additional RGB shift and strage lighting:
https://mega.nz/file/KyoTxApD#kHwdej...hIXZBIaGS9BIkw





Greetings
Eli
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
Eliseat is offline   Reply With Quote
Old 06-02-2020, 07:35 AM   #2
read
Human being with feelings
 
Join Date: Apr 2015
Posts: 1,378
Default

got to try this cheers Eliseat

thanks for your input in my video learning endevior

i never thought i would be using reaper for most things but it seems its what i mostly use now.

Even with the new metadata additions, trying to learn them!
read is offline   Reply With Quote
Old 06-02-2020, 10:53 AM   #3
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

If someone wants to play around with it. Here is the project file. Just change the music and bg-image to your needs and play around with the oscilloscope as source, with the circle as base and with kaleidoscope as a surprising effect topping.

Btw: I used the amalgama text overlay because I wanted to test it. If you don't have the Aquire font installed, your result will differ. But that's no problem. Just use your own fonts or download it for personal use here: https://www.fontspace.com/aquire-font-f43735

Have fun. Here is the project.

https://mega.nz/file/b6IA1QQa#exhT5S...ggpEuQPowO5hgs
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
Eliseat is offline   Reply With Quote
Old 06-07-2020, 01:36 PM   #4
urednik
Human being with feelings
 
urednik's Avatar
 
Join Date: Apr 2010
Posts: 1,247
Default

Danke,

aber, hasst du eine Idee, warum die Resolution der Fonts so niedrig ist?

Have you any idea why the font resolution is that small? (need to export as 4K to get a 1280px resolution).
__________________
W10 (64) Lenovo E540 - SSD; Lenovo B590; W7 (32), Compaq 610 (2.1Ghz core 2 duo, L2 cache, 2GB RAM); DPA 4018, Schoeps MK2, Schoeps MTSC 64, Neumann mk184, AEA Ribbon 88mk, AKG SolidTUBE; Focusrite Scarlett 18i20, recording merely live acoustic music.
urednik is offline   Reply With Quote
Old 06-07-2020, 01:40 PM   #5
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Quote:
Originally Posted by urednik View Post
Have you any idea why the font resolution is that small? (need to export as 4K to get a 1280px resolution).
What do you mean? I think he just uses image with text, but I am not sure. Maybe it is about anti-aliasing?
vitalker is offline   Reply With Quote
Old 06-07-2020, 02:01 PM   #6
urednik
Human being with feelings
 
urednik's Avatar
 
Join Date: Apr 2010
Posts: 1,247
Default

No, the text tool rewritten with shadow gives a low resolution text, until you overpixelate it, only then it is usable.
Here is a cut out with exact pixels (not enlarged - should not be pixelated) from Eliseats project file.
As you can see also the circle is in a to low resolution.
Attached Images
File Type: jpg Brez naslova.jpg (36.6 KB, 385 views)
__________________
W10 (64) Lenovo E540 - SSD; Lenovo B590; W7 (32), Compaq 610 (2.1Ghz core 2 duo, L2 cache, 2GB RAM); DPA 4018, Schoeps MK2, Schoeps MTSC 64, Neumann mk184, AEA Ribbon 88mk, AKG SolidTUBE; Focusrite Scarlett 18i20, recording merely live acoustic music.
urednik is offline   Reply With Quote
Old 06-07-2020, 02:07 PM   #7
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Quote:
Originally Posted by urednik View Post
No, the text tool rewritten with shadow gives a low resolution text, until you overpixelate it, only then it is usable.
Here is a cut out with exact pixels (not enlarged - should not be pixelated) from Eliseats project file.
As you can see also the circle is in a to low resolution.
Ok, got it. We should then ask for a higher resolution for text. Your video is really nice and musicians are good, especially singers.
vitalker is offline   Reply With Quote
Old 06-07-2020, 02:12 PM   #8
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Hi,

no, I'm not a "he" and I also didn't use an image for the text. I used amalgamas Text overlay from inside video processor for it. The problem with pixelated fonts is well known and discussed, there is no solution at the moment. As Vtalker mentioned, the best way to make sure nothing looks pixelated is to create a transparent png image with the text in Photoshop or similar.

One way is to create a snapshot of your video and export it to Photoshop. (Just to get a template, how it looks.) There you place your text and export it without the video background (transparent) to Reaper. Use the video processor image overlay preset, which makes sure the transparent area of the image gets transparent in the video too. Since Justin changed the preset to show the overlayed image in 100% size, it doesn't matter if you use the the full 4k video size or only the size of the text for your image. (Then you would have to place it via x and y offset!) Just make sure its zoom is at 1!

Okay, if I were you I wouldn't understand my crappy English, but if you have questions just ask. I will help. Or someone else.

Greetings
Eli
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
Eliseat is offline   Reply With Quote
Old 06-07-2020, 02:15 PM   #9
urednik
Human being with feelings
 
urednik's Avatar
 
Join Date: Apr 2010
Posts: 1,247
Default

Thank you. Yes, would be nice to solve, so we can export at desired resolution.
Less disturbing but also present is pixelation of the default text code. However people do not seem to be bothered by that.
So Eli, if you have any ideas how to improve that it would be great!
__________________
W10 (64) Lenovo E540 - SSD; Lenovo B590; W7 (32), Compaq 610 (2.1Ghz core 2 duo, L2 cache, 2GB RAM); DPA 4018, Schoeps MK2, Schoeps MTSC 64, Neumann mk184, AEA Ribbon 88mk, AKG SolidTUBE; Focusrite Scarlett 18i20, recording merely live acoustic music.
urednik is offline   Reply With Quote
Old 06-07-2020, 02:18 PM   #10
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Quote:
Originally Posted by urednik View Post
No, the text tool rewritten with shadow gives a low resolution text, until you overpixelate it, only then it is usable.
Here is a cut out with exact pixels (not enlarged - should not be pixelated) from Eliseats project file.
As you can see also the circle is in a to low resolution.
You also could try another font since I realized there are some which work a bit better (less pixelated) than others.

But this really should get fixed. Its one of some bottlenecks which dims the fun with Reaper video.
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
Eliseat is offline   Reply With Quote
Old 06-07-2020, 02:19 PM   #11
urednik
Human being with feelings
 
urednik's Avatar
 
Join Date: Apr 2010
Posts: 1,247
Default

Thanks Eli, sorry, did not know avout your Geschlecht ...
Yes but easier to do then just to export it as 4k and nothing gets scrambled, the text is clear enough. I did this with isolation videos for thet purpose.
__________________
W10 (64) Lenovo E540 - SSD; Lenovo B590; W7 (32), Compaq 610 (2.1Ghz core 2 duo, L2 cache, 2GB RAM); DPA 4018, Schoeps MK2, Schoeps MTSC 64, Neumann mk184, AEA Ribbon 88mk, AKG SolidTUBE; Focusrite Scarlett 18i20, recording merely live acoustic music.
urednik is offline   Reply With Quote
Old 06-07-2020, 02:21 PM   #12
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Quote:
Originally Posted by Eliseat View Post
no, I'm not a "he"
I am so sorry, pretty lady. You know, there are so few women there... Sorry again.
vitalker is offline   Reply With Quote
Old 06-07-2020, 02:24 PM   #13
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Quote:
Originally Posted by Eliseat View Post
Since Justin changed the preset to show the overlayed image in 100% size, it doesn't matter if you use the the full 4k video size or only the size of the text for your image. (Then you would have to place it via x and y offset!) Just make sure its zoom is at 1!
Actually you can fix the image size, so it won't change its resolution. I don't remember, but I guess it works.
vitalker is offline   Reply With Quote
Old 06-08-2020, 12:38 AM   #14
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Quote:
Originally Posted by vitalker View Post
Actually you can fix the image size, so it won't change its resolution. I don't remember, but I guess it works.
My description was a bit misleading. The first version of Image Overlay stretched all images to fit the video screen. So you had to fiddle with the zoom parameter to get it the right size never knowing if its really 100%. Since a while this has been fixed by Justin. So images show up the size they really are, not 200% or stretched to fit the screen. urednik shouldn't be bothered by that.

That's what I wanted to say.
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
Eliseat is offline   Reply With Quote
Old 06-15-2020, 01:26 PM   #15
androo
Human being with feelings
 
androo's Avatar
 
Join Date: Feb 2009
Location: Belgium
Posts: 211
Default

Thaaaaats cool! Thanks for sharing!
androo is offline   Reply With Quote
Old 06-16-2020, 01:35 PM   #16
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Cool!
IXix is online now   Reply With Quote
Old 05-09-2021, 12:53 PM   #17
horneusz
Human being with feelings
 
horneusz's Avatar
 
Join Date: Aug 2013
Location: Poland
Posts: 105
Default

I made a video using Video to Circle, but I can't get a perfect circle.
At the bottom of the circle there is a visible merge. How can this be fixed?

horneusz is offline   Reply With Quote
Old 05-14-2021, 12:50 PM   #18
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Quote:
Originally Posted by horneusz View Post
I made a video using Video to Circle, but I can't get a perfect circle.
At the bottom of the circle there is a visible merge. How can this be fixed?

I guess its not possible to get rid of it because its technically the left and the right side of the spectrum bend against each other. So they will always be different and build a gap. Maybe someone can find a way to rethink the whole thing. But i have no idea. Sorry.
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
Eliseat is offline   Reply With Quote
Old 10-04-2023, 03:30 PM   #19
SpockAndStep
Human being with feelings
 
Join Date: Oct 2023
Posts: 1
Default Cannot get this to work for the life of me

Im using reaper on both windows AND mac and i can't get it to work. can someone please help me
SpockAndStep is offline   Reply With Quote
Old 10-04-2023, 05:36 PM   #20
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by SpockAndStep View Post
Im using reaper on both windows AND mac and i can't get it to work. can someone please help me
You mean round oscilloscope from a sound track on top of a background? Then you need:

low track: your bg image or video resized to project size
high track: the audio source with this fx chain:
- js video sample peeker
- video:decorative oscilloscope
- video:video to circle
- video: image overlay

These presets (oscilloscope + circle) do not provide a transparent background so you need to lower opacity in the overlay preset to show the image in the low track. But you can also use these revised versions that give perfectly transparent backgrounds:

Code:
//Decorative Oscilloscope with Blitter (requires JSFX video sample peeker)
// with transparent background
//@gmem=jsfx_to_video
//@param mode "mode" 0 0 2 0 1
//@param dotcount "point count" 1200 10 5000 400 10
//@param dotsize "point size" 4 2 40 20 1
//@param gain_db "gain (dB)" -6 -80 12 -12 1
//@param zoom_amt "blitter zoom" .27 -.5 1 .1 0.01
//@param fadespeed "blitter persist" .8 0 1 .1 0.01
//@param filter "blitter filter" 1 0 1 0 1
//@param fg_r "foreground R" 1 0 1 .5 .02
//@param fg_g "foreground G" 1 0 1 .5 .02
//@param fg_b "foreground B" 1 0 1 .5 .02
//@param bg_r "background R" 0 0 1 .5 .02
//@param bg_g "background G" 0 0 1 .5 .02
//@param bg_b "background B" 0 0 1 .5 .02
//@param bgo "bg opacity" .5 0 1 .5 .01
//@param cx "center X" .5 0 1 .5 .01
//@param cy "center Y" .5 0 1 .5 .01
colorspace='RGBA';  //for transparency
last_frame && fadespeed > 0 ? (
  xo = project_w*zoom_amt*.25;
  yo = project_h*zoom_amt*.25;
  gfx_mode=filter>0?0x100:0;
  xo < 0 ? gfx_blit(last_frame,0);
  gfx_blit(last_frame,0,0,0,project_w,project_h,xo,yo,project_w-xo*2,project_h-yo*2);
);
gfx_set(bg_r,bg_g,bg_b,last_frame ? (1-fadespeed) : 1);
gfx_a>.001 ? (gfx_a2=bgo; gfx_fillrect(0,0,project_w,project_h); gfx_a2=1); //transparent bg

bufplaypos = gmem[0];
bufwritecursor = gmem[1];
bufsrate = gmem[2];
bufstart = gmem[3];
bufend = gmem[4];
nch = gmem[5];
gain = 10^(gain_db*(1/20));

dt=max(bufplaypos - project_time,0);
dt*bufsrate < dotcount ? underrun_cnt+=1;
rdpos = bufwritecursor - ((dt*bufsrate - dotcount)|0)*nch;
rdpos < bufstart ? rdpos += bufend-bufstart;

gfx_set(fg_r,fg_g,fg_b,1);

function getpt()
(
  l = gmem[rdpos]; r = gmem[rdpos+1];
  (rdpos += nch)>=bufend ? rdpos=bufstart;
);
i=0;

mode==2 ? (
  loop(dotcount,
    getpt();
    ang = atan2(l,r); dist = sqrt(sqr(l)+sqr(r));
    xp = cx*project_w + ((cos(ang)*dist*gain)*project_h-dotsize)*.5;
    yp = ((cy*2+sin(ang)*dist*gain)*project_h-dotsize)*.5;
    gfx_fillrect(xp,yp, dotsize,dotsize);
  );
) : mode == 1 ? (
  loop(dotcount,
    getpt();
    yp = project_h * (cy - .5 + i / dotcount);
    xp = project_w * (cx + (l+r)*.25*gain);
    gfx_fillrect(xp-dotsize*.5,yp-dotsize*.5, dotsize,dotsize);
    i+=1;
  );

) : (
  loop(dotcount,
    getpt();
    xp = project_w * (cx - 0.5 + i / dotcount);
    yp = project_h * (cy + (l+r)*.25*gain);
    gfx_fillrect(xp-dotsize*.5,yp-dotsize*.5, dotsize,dotsize);
    i+=1;
  );
);

gfx_img_free(last_frame);
last_frame=gfx_img_hold(-1);
Code:
//Video to Circle 
// with transparent background around the circle
//@param1:cstart 'circle start' 1 0 1 1
//@param2:panhoz 'pan horizontal' 1.3 -0.65 3.3 0
//@param3:panhor 'pan vertical' .22 -1 1.5 0
//@param4:zoom 'zoom' 1.4 -1 5 0
//@param5:squvert 'squeeze vert' 1.55 -5 5 0
//@param6:squhor 'squeeze hor' 2.7 -5 5 0

input_info(0,w,h)?(
  y=tab=0; 
  tabsz=90;
  loop(tabsz,
    x=0;
    loop(tabsz,
      dx = x/tabsz-panhoz;
      dy = 1-y/tabsz-panhor;
      ang = atan2(dx,dy);
      dist = (sqr(dx)+sqr(dy));
      z= ((ang-$pi/cstart)*w*.5)/$pi;
      z<0?z+=w;
      tab[]=z;
      tab[1] = h-(dist*h/(.5^2+1))*zoom;
      
      tab+=2;
      x+=squhor;
    );
    y+=squvert;
  );
  tab=0;
  colorspace='RGBA';
  gfx_set(0,0,0,1,0x100,-1,0); 
  gfx_img_resize(-1,w,h,1);
  gfx_xformblit(0, 0,0,w,h,tabsz,tabsz,tab,0);
);
papagirafe is offline   Reply With Quote
Old 10-05-2023, 07:09 AM   #21
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,272
Default

I made a preset a while back with a mode that just does the circular Oscope thing directly:
https://forum.cockos.com/showthread.php?t=264631
ashcat_lt is online now   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 01:58 PM.


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