Old 03-07-2023, 09:35 PM   #1
vsthem
Human being with feelings
 
Join Date: Nov 2018
Posts: 464
Default Zooming not smooth

I have a video I need to put together, and writing music to it, so I thought I'd try to use the reaper video editor for the first time. I love everything I've poked around with, except for when I tried to zoom in on a still image. The result was not a smooth zoom in, but one with lots of micro stops and starts.

Google lead me to some older threads complaining about this problem, but I wanted to check in here and see if there were any workarounds that have come about, or if there was any hope that the devs might work on this. If this was fixed, I could probably switch to reaper for all my video stuff, which would be amazing.

Thanks all!
vsthem is offline   Reply With Quote
Old 03-08-2023, 03:56 AM   #2
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 492
Default

Quote:
Originally Posted by vsthem View Post
I have a video I need to put together, and writing music to it, so I thought I'd try to use the reaper video editor for the first time. I love everything I've poked around with, except for when I tried to zoom in on a still image. The result was not a smooth zoom in, but one with lots of micro stops and starts.

Google lead me to some older threads complaining about this problem, but I wanted to check in here and see if there were any workarounds that have come about, or if there was any hope that the devs might work on this. If this was fixed, I could probably switch to reaper for all my video stuff, which would be amazing.

Thanks all!
I came accross that problem in the past and it´s related to rounding issues with the gfx_blit() function and there is a fix for that. Which preset(s) are you using?
papagirafe is online now   Reply With Quote
Old 03-08-2023, 10:34 AM   #3
vsthem
Human being with feelings
 
Join Date: Nov 2018
Posts: 464
Default

Basic Helpers: Track opacity/zoom/pan

Are there better ones to use for this function?
vsthem is offline   Reply With Quote
Old 03-08-2023, 12:17 PM   #4
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 492
Default

Quote:
Originally Posted by vsthem View Post
Basic Helpers: Track opacity/zoom/pan

Are there better ones to use for this function?
Yes and no, it depends heavily on the context of use. Assuming that your are not rotating the image, here is a patched version of the preset. Let me know if this works for you. Just copy and paste this code over the existing one (and save! ctrl-s).
Code:
// Track opacity/zoom/pan
//  **** patched for "smoothness"
//@param1:opacity 'opacity' 1
//@param2:zoom 'zoom' 0 -10 10 0
//@param3:xoffs 'X offset' 0 -1 1 0
//@param4:yoffs 'Y offset' 0 -1 1 0
//@param5:rotate 'rotate' 0 -360 360 0 1
//@param7:filter 'filter' 0 0 1 0.5 1
//@param8:clear 'clear bg' 1 0 1 0.5 1
//@param9:force_w 'force width' 0 0 2600 1024 2
//@param10:force_h 'force height' 0 0 2600 1024 2
//@param11:paspect 'preserve aspect' 1 0 1 0.5 1

function round(v)((v+0.5)|0);
function round2(v)(((v+1)>>1)<<1);

(bg_img=input_ismaster() ? -2 : input_track(0)) ? (
  force_w &= -2; force_h &= -2;
  force_w && !force_h ? force_h = (force_w * project_h / project_w)&-2;
  force_h && !force_w ? force_w = (force_h * project_w / project_h)&-2;
  force_w>0 && force_h>0 ? ( project_w=force_w; project_h=force_h );

  w = opacity < 0.01 ? 0 : opacity > 0.99 ? 1 : opacity;
  gfx_a2=0;
  gfx_blit((w < 1 || clear < 0.5) ? bg_img : -2,1);

  w > 0 ? (
    gfx_mode = filter>0.5 ? 256 : 0;
    gfx_a=w;
    z = 10^(zoom/10);
    dw = (project_w*z)&-2;
    dh = (project_h*z)&-2;
    x = (project_w - dw + xoffs*(project_w+dw))*.5;
    y = (project_h - dh + yoffs*(project_h+dh))*.5;
                                                   // *** patch is here ***
    rotate == 0 ? gfx_blit(0,paspect, round(x),round(y),round2(dw),round2(dh)) : (
      input_info(0,srcw,srch);
      sc=2.0; sc2=sc*.5 - 0.5;
      gfx_rotoblit(0,rotate*$pi/180,(x-dw*sc2)|0,(y-dh*sc2)|0,dw*sc,dh*sc, -srcw*sc2, -srch*sc2, srcw*sc, srch*sc);
    );
  );
);
papagirafe is online now   Reply With Quote
Old 03-08-2023, 05:50 PM   #5
vsthem
Human being with feelings
 
Join Date: Nov 2018
Posts: 464
Default

So much better! Amazing! Thank you!
vsthem is offline   Reply With Quote
Old 03-09-2023, 01:30 AM   #6
Winfield
Human being with feelings
 
Winfield's Avatar
 
Join Date: Jan 2007
Location: The Underground Bunker
Posts: 685
Default

I could of course copy paste the script above, but am wondering how many of my other presets that should be updated.

Are these (or any) presets updated with Reaper?
__________________
"if DAWs are religions, REAPER is atheism" - The big J
__________________
Windows 10x64 | Asus Z170-a i7, 32GB ram | RME-Digiface USB
Winfield 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:06 PM.


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