Old 12-17-2018, 01:22 AM   #1
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default Zoomed images moving to roughly

Hi,

I noticed that zoomed images are unable to pan smoothly thru the screen.

While I was working on a simple slideshow to demonstrate nearly all possible transition types in Reaper I got stuck by this problem. At first I thought its kind of a parameter problem, that the values of the automation only are stepped because of the coarse parameter dial resolution. But it seems more like a magnifying effect as if the vertical and horizontal pan gets zoomed with the image what makes the little steps visible. The weird thing is, not only the movement in one direction looks chunky it also happens that the images jumps for one pixel or a certain step in another direction and back.

Here is an example:


The chunky movement is not only from the 10 frames per second. The video looks nearly then same. The problem is more the left/right/up/down micro movement. Here the video: https://mega.nz/#!C2pUTabS!rPStu-TrL...PzidghcvBZralQ

I have no idea if this is a preset problem as it happens in the default Opacity, zoom, pan preset as well as in the Essential video controls from Jon. Or if this is a general problem with the automation resolution. Maybe its to rough for this kind but okay for audio?

You can recreate this problem by zooming an image to 1.5 and slowly panning it in both directions. You would say that zooming this high should be avoided but sometimes its necessary to do so.

Any idea of how to fix that?

Many thanks
Eli

Last edited by Eliseat; 12-17-2018 at 01:30 AM.
Eliseat is offline   Reply With Quote
Old 12-17-2018, 10:44 AM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,716
Default

Hmm perhaps try decreasing the automation step size via the //@param lines?
Justin is offline   Reply With Quote
Old 12-17-2018, 11:38 AM   #3
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

I will make further tests to see what its all about.
Eliseat is offline   Reply With Quote
Old 12-18-2018, 12:44 AM   #4
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

So it happens if you pan and zoom at the same time. Even slightly zooming leads into little jumps. I tried (hopefully right) to decrease the step size but this doesn't change anything.
For my understanding the resolution of video automation always should happen with maximal possible resolution/sub-division independent from the parameter dial resolution. And it seems this already is the case. But for some reason the zoom and pan coordinates don't fit to each other. Maybe something gets round down?

Take a look at this example: Same set up of an image getting moved and zoomed. Once with default preset. Once with decreased step size preset. This jumping movement also gets rendered.


I will make a further test if it also happens with video.
Eliseat is offline   Reply With Quote
Old 12-18-2018, 08:46 AM   #5
rluka
Human being with feelings
 
rluka's Avatar
 
Join Date: Jul 2013
Location: Edmonton, Alberta, Canada
Posts: 258
Default

I am also having the same problem with test sizing and zooming especially at the beginning and ending of this video.

https://youtu.be/qFhoFabeUCU

Licecap view:
https://drive.google.com/open?id=13y...aTWrqLkO2UcbFJ


Ron L
__________________
Ron L, i7 laptop x64, Win7pro/x64(dual boot), 7200rpm hd, 2 ext. hd, Scarlett 2i4, Event 20/20 audio monitors, 1 ext. video monitor, Novation Launch Control XL, REAPER x64, Sonar Platinum

Last edited by rluka; 12-19-2018 at 01:30 PM.
rluka is offline   Reply With Quote
Old 12-18-2018, 08:52 AM   #6
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Quote:
Originally Posted by rluka View Post
I am also having the same problem with test sizing and zooming especially at the beginning and ending of this video.

https://youtu.be/RAg3BseHPPk

Ron L
Yes, that's a good example. In your case it looks like the scaling/zooming only happens after every 5th frame or so. But even if you scale a large amount it always should move smoothly.

Greetings
Eli

BTW: Nice and crisp sound, lovely melody. Like it!
Eliseat is offline   Reply With Quote
Old 12-18-2018, 10:23 AM   #7
rluka
Human being with feelings
 
rluka's Avatar
 
Join Date: Jul 2013
Location: Edmonton, Alberta, Canada
Posts: 258
Default

Quote:
Originally Posted by Eliseat View Post
BTW: Nice and crisp sound, lovely melody. Like it!
Off topic: Do you think I should roll off some of the brightness ?
__________________
Ron L, i7 laptop x64, Win7pro/x64(dual boot), 7200rpm hd, 2 ext. hd, Scarlett 2i4, Event 20/20 audio monitors, 1 ext. video monitor, Novation Launch Control XL, REAPER x64, Sonar Platinum
rluka is offline   Reply With Quote
Old 12-18-2018, 08:23 PM   #8
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

Quote:
Originally Posted by Eliseat View Post
It really looks like its jumping backwards in this gif but I'm having problems to reproduce that.
Code-wise there's something which rounds the zoomed image dimensions to numbers that are divisible by 2 (5 becomes 4, 123 becomes 122 etc.). Not completely sure what this does (let the image stay centered?) but do you see any improvements concerning the backwards jumping if you remove the "&0xfffe" part from these lines (line 33 and 34)?
Code:
    dw = (project_w*z)&0xfffe;
    dh = (project_h*z)&0xfffe;
EDIT: ah I can reproduce it by zooming into the image and simultaneously moving it down so that the upper border of the image has 2 opposing directions. My quick fix seems to prevent jumping back but for now I'm not sure if this breaks something else.

(btw enabling filtering makes edges in the image look much more smooth)

Last edited by wwwmaze; 12-18-2018 at 09:20 PM.
wwwmaze is offline   Reply With Quote
Old 12-19-2018, 12:58 AM   #9
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Hi wwwmaze,

I don't have these lines as I'm probably using a different (optimized) version from a dev. The corresponding code looks like this:

Code:
dw = (project_w*z)&-2;
dh = (project_h*z)&-2;
Anyway. If I remove those lines the preset stops working. If I remove the &-2 it stops jumping back as you suggested. (I already guessed it could have something to do with rounding but was of course to stupid to see it in the code. )

For me this was a serious drawback in the whole concept of video/image editing as it makes it nearly impossible to do simplest tasks. And I was just wondering why I never discovered it before.

This is what it looks like now:



The jumps are gone. But I'm not sure if those steps are right. And in rluka's example you can see in the beginning that the movement seems to be smooth while the zooming makes kind of stepped progression. This looks weird. I will make further tests.

Many thanks for your help.

BTW: rluka, I actually can't listen to your mix with my studio headphones as they are broken. For me it sound great over Bluetooth.
Eliseat is offline   Reply With Quote
Old 12-19-2018, 01:11 AM   #10
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Here is what I mean:


In other video apps those scaling and moving updates happen in every frame. In Reaper it doesn't just look like its stepped. It is kind of. Or could there be something wrong with my thoughts? I'm not sure if I make a mistake supposing the motion updating in every frame. But doesn't it need to do so?

At least it feels like that.

Greeting
Eli
Eliseat is offline   Reply With Quote
Old 12-19-2018, 10:23 AM   #11
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

I really think the issue of the image jumping back is a bug in the video-processor code. If anybody wants to reproduce it, it's much more noticeable if you set video size to something ridiculously low in project settings, like 20x20.
But I can't figure out why it's happening. Removing the "&0xfffe" or "&-2" part (kind of the the same thing) of lines 33 and 34 solves it even though it makes zooming not exactly symmetrical.

The issue of zooming appearing to be stepped could be caused by limitations of gfx_blit (which can take only discrete values) and may be improved by filtering frames over time but it probably reduces the image sharpness.
wwwmaze is offline   Reply With Quote
Old 12-19-2018, 01:35 PM   #12
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

Quote:
Originally Posted by wwwmaze View Post
... may be improved by filtering frames over time but it probably reduces the image sharpness.
This is a very primitive motion blur (it just averages the last and current frame).
Basically it's just a tiny mod of Justins "show motion- subtract last frame" preset:
PHP Code:
// Simple motion blur
input 0// could also do input = input_track(0);
input || input_track(0) > || input_count() == || input_ismaster() ? (
  
input_info(input,project_w,project_h);
  
hf ? (
    
gfx_img_getptr(hf) != gfx_img_getptr(input) ? (
      
gfx_img_free(last_frame);
      
last_frame hf;
      
hf gfx_img_hold(input);
    );
    
gfx_blit(last_frame);
    
gfx_a=0.5;
    
gfx_blit(input,1);
  ) : (
    
// first frame: black
    
gfx_fillrect(0,0,project_w,project_h);
    
hf gfx_img_hold(input);
    
last_frame gfx_img_hold(hf);
  );
); 
Maybe it helps a bit.
You can increase the effect by duplicating the preset.

EDIT: updated to set preferred video size to size of input

Last edited by wwwmaze; 12-19-2018 at 04:10 PM. Reason: updated to set preferred video size to size of input
wwwmaze is offline   Reply With Quote
Old 12-19-2018, 02:17 PM   #13
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,716
Default

Quote:
Originally Posted by wwwmaze View Post
I really think the issue of the image jumping back is a bug in the video-processor code. If anybody wants to reproduce it, it's much more noticeable if you set video size to something ridiculously low in project settings, like 20x20.
But I can't figure out why it's happening. Removing the "&0xfffe" or "&-2" part (kind of the the same thing) of lines 33 and 34 solves it even though it makes zooming not exactly symmetrical.

The issue of zooming appearing to be stepped could be caused by limitations of gfx_blit (which can take only discrete values) and may be improved by filtering frames over time but it probably reduces the image sharpness.
Try changing the &0xfffe or &-2 to 0xffff or -1, and changing it to use RGB colorspace?

The reason for &-2 / &0xfffe is to make all pixel offsets even, because with YV12/YUY2 and subsampling drawing at odd offsets can do odd things. Maybe those are unnecessary and unhelpful though.
Justin is offline   Reply With Quote
Old 12-19-2018, 02:49 PM   #14
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Quote:
Originally Posted by wwwmaze View Post
This is a very primitive motion blur (it just averages the last and current frame).
Basically it's just a tiny mod of Justins "show motion- subtract last frame" preset:
PHP Code:
// simple motion blur
input 0// could also do input = input_track(0);
input || input_track(0) > || input_count() == || input_ismaster() ? (
  
hf ? (
    
gfx_img_getptr(hf) != gfx_img_getptr(input) ? (
      
gfx_img_free(last_frame);
      
last_frame hf;
      
hf gfx_img_hold(input);
    );
    
gfx_blit(last_frame);
    
gfx_a=0.5;
    
gfx_blit(input,1);
  ) : (
    
// first frame: black
    
gfx_fillrect(0,0,project_w,project_h);
    
hf gfx_img_hold(input);
    
last_frame gfx_img_hold(hf);
  );
); 
Maybe it helps a bit.
You can increase the effect by duplicating the preset.
While this motion blur is pretty awesome (Thank you again, wwwmaze. ) it only helps for faster motion where this squary movement can't be seen anyway. It seems there is something odd going on which rounds or adds zoom and pan together. Because it looks like zoom happens only every 4th or 5th frame while panning sometimes updates every single frame (as expected) but stops after zooming has updated.
I will take a look if this can be analyzed a bit more in detail. Maybe I should zoom and pan for 10% with linear interpolation or something like that.

But thanks to both of you, for making some thoughts about it.

Good night.
Eli
Eliseat is offline   Reply With Quote
Old 12-19-2018, 03:30 PM   #15
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

Quote:
Originally Posted by Justin View Post
Try changing the &0xfffe or &-2 to 0xffff or -1, and changing it to use RGB colorspace?

The reason for &-2 / &0xfffe is to make all pixel offsets even, because with YV12/YUY2 and subsampling drawing at odd offsets can do odd things. Maybe those are unnecessary and unhelpful though.
Ah that makes sense, I didn't thought about how YV12/YUY2 operates that's why I'm seeing artifacts without the rounding with YV12/YUY2 but not with RGB I suppose.
But sorry for the blunt question, are you sure offsetting only to even indices even works in the preset? (try setting video size to something very small in video settings).
wwwmaze is offline   Reply With Quote
Old 12-19-2018, 03:37 PM   #16
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

Quote:
Originally Posted by Eliseat View Post
While this motion blur is pretty awesome (Thank you again, wwwmaze. ) it only helps for faster motion where this squary movement can't be seen anyway. It seems there is something odd going on which rounds or adds zoom and pan together. Because it looks like zoom happens only every 4th or 5th frame while panning sometimes updates every single frame (as expected) but stops after zooming has updated.
I will take a look if this can be analyzed a bit more in detail. Maybe I should zoom and pan for 10% with linear interpolation or something like that.

But thanks to both of you, for making some thoughts about it.

Good night.
Eli
Hey Eli,

are you sure you're seeing this with rendered videos? It's like you describe here too but only while playing the video not after render.

See this example for an extreme setting (setting video size to 1000x1000 and using A LOT of chained motion blur effects) for a rendered gif:

wwwmaze is offline   Reply With Quote
Old 12-21-2018, 10:02 AM   #17
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

wwwmaze, this looks quite smooth. But its without panning.



Anyway, this motion blur is great. (And my post is kind of off topic.) I figured out how to change the alpha to make it more subtle but for some reason it reacts to sensible. Even the slowest motion gets a lot of last frame blending what would be good for the slow zooming example in your post but is to much for a real application.

Is there a way to decrease the distance of the blends or even to make a slower reaction? So it increases the blur later at higher speeds but not so much in slower?

Look at this example: There are two cycles. One with clean motion, one with motion blur 0.1 alpha. This looks almost perfect but as you see, it reacts just not fluidly or dynamically. Its more like a linear alignment of motion blur distance what doesn't look naturally. Does it need an algorithmic adaption? Have no idea.



I know you did this little gem just to show how to even out the zoom issue. But this has so much potential to rock the Reaper video world ...
Eliseat is offline   Reply With Quote
Old 12-21-2018, 10:14 AM   #18
rluka
Human being with feelings
 
rluka's Avatar
 
Join Date: Jul 2013
Location: Edmonton, Alberta, Canada
Posts: 258
Default

[QUOTE=wwwmaze;2072302]Hey Eli,

are you sure you're seeing this with rendered videos? It's like you describe here too but only while playing the video not after render.

See this example for an extreme setting (setting video size to 1000x1000 and using A LOT of chained motion blur effects) for a rendered gif:

Is there anything here that I can apply to fix my choppy text.
Ron L
__________________
Ron L, i7 laptop x64, Win7pro/x64(dual boot), 7200rpm hd, 2 ext. hd, Scarlett 2i4, Event 20/20 audio monitors, 1 ext. video monitor, Novation Launch Control XL, REAPER x64, Sonar Platinum
rluka is offline   Reply With Quote
Old 12-21-2018, 01:54 PM   #19
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,716
Default

Try this preset, which lets you control the top/left position of the image with parameters, and has a better size control:
Code:
// Track opacity/zoom/pan
//@param1:opacity 'opacity' 1
//@param2:zoom 'scale' 0 -2 2 0 .01
//@param3:xoffs 'X position' 0 -2000 2000 0 1
//@param4:yoffs 'Y position' 0 -2000 2000 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

(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_blit((w < 1 || clear < 0.5) ? bg_img : -2,1);

  w > 0 ? (
    gfx_mode = filter>0.5 ? 256 : 0;
    gfx_a=w;
    dw = (project_w*10^zoom)|0;
    dh = (project_h*10^zoom)|0;
    gfx_blit(0,paspect, xoffs|0,yoffs|0,dw,dh);
  );
);
Justin is offline   Reply With Quote
Old 12-21-2018, 04:45 PM   #20
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

Quote:
Originally Posted by Eliseat View Post
wwwmaze, this looks quite smooth. But its without panning.



Anyway, this motion blur is great. (And my post is kind of off topic.) I figured out how to change the alpha to make it more subtle but for some reason it reacts to sensible. Even the slowest motion gets a lot of last frame blending what would be good for the slow zooming example in your post but is to much for a real application.

Is there a way to decrease the distance of the blends or even to make a slower reaction? So it increases the blur later at higher speeds but not so much in slower?

Look at this example: There are two cycles. One with clean motion, one with motion blur 0.1 alpha. This looks almost perfect but as you see, it reacts just not fluidly or dynamically. Its more like a linear alignment of motion blur distance what doesn't look naturally. Does it need an algorithmic adaption? Have no idea.



I know you did this little gem just to show how to even out the zoom issue. But this has so much potential to rock the Reaper video world ...
Quick answer (in a hurry): I'm not sure I understand you 100% but I think the video looks a bit unnatural because maybe you reduced alpha of the current frame? I could be wrong but the current frame looks like it has less alpha than the last frame (i.e. the frame before the current).

Could it be that you set "gfx_a=0.5" in line 11 to something low?
You would need to set it to something high if you need more opacity for current frame.

I dont know, could be the blur too, which is super primitive, just averaging 2 frames.
wwwmaze is offline   Reply With Quote
Old 12-21-2018, 10:18 PM   #21
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Quote:
Originally Posted by wwwmaze View Post
Quick answer (in a hurry): I'm not sure I understand you 100% but I think the video looks a bit unnatural because maybe you reduced alpha of the current frame? I could be wrong but the current frame looks like it has less alpha than the last frame (i.e. the frame before the current).

Could it be that you set "gfx_a=0.5" in line 11 to something low?
You would need to set it to something high if you need more opacity for current frame.

I dont know, could be the blur too, which is super primitive, just averaging 2 frames.
Haha, this is irony. So I once in my life thought I had found something in the code which does what I want. (Felt kind of cool.) But only to hear from you that it did exactly the opposite?
Great. How embarrassing can it get?

Anyway. What I wanted to say in the first place was: This motion blur is amazing. And if it would react more naturally to motion (less in slow movement) it would be stunning as it doesn't need a lot of cpu and could be used to cinemize any motion/movement of text, image and graphic objects.
Eliseat is offline   Reply With Quote
Old 12-21-2018, 10:18 PM   #22
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Quote:
Originally Posted by Justin View Post
Try this preset, which lets you control the top/left position of the image with parameters, and has a better size control:
Code:
// Track opacity/zoom/pan
//@param1:opacity 'opacity' 1
//@param2:zoom 'scale' 0 -2 2 0 .01
//@param3:xoffs 'X position' 0 -2000 2000 0 1
//@param4:yoffs 'Y position' 0 -2000 2000 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

(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_blit((w < 1 || clear < 0.5) ? bg_img : -2,1);

  w > 0 ? (
    gfx_mode = filter>0.5 ? 256 : 0;
    gfx_a=w;
    dw = (project_w*10^zoom)|0;
    dh = (project_h*10^zoom)|0;
    gfx_blit(0,paspect, xoffs|0,yoffs|0,dw,dh);
  );
);
I will test that. Many thanks.
Eliseat is offline   Reply With Quote
Old 12-22-2018, 07:31 AM   #23
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Okay, to demonstrate whats happening I firstly tried to demonstrate whats going on by comparing Reapers video scaling/zooming to the master of video editing: Premiere Pro

drum roll ... here the result: There is no noticeable different! Scaling as an separate process just works as it should work.

Examples:
Premiere scaling only
Reaper scaling only

BUT then I compared another set up. Scaling AND moving. That's where I found out the step like motion when I tried to make a slideshow. So I set up a scene with a little box moving a bit and scaling a bit. And here you can clearly see the poodles core. Premiere has no problem showing a smooth result while Reaper shows the discussed problem without any sense of shame.

Examples:
Premiere scaling and moving
Reaper scaling and moving (see the little jumps)

Justin, I also tested your alternative scaling preset. But as long as scaling and moving come together, those little jumps still appear.

It seems that Premiere pro also has some problems with scaling and moving at the same time but it smooths the motion kind of so it doesn't show up like hard little steps rather then soft wobbles.

Last edited by Eliseat; 12-22-2018 at 07:36 AM.
Eliseat is offline   Reply With Quote
Old 12-22-2018, 03:17 PM   #24
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

Quote:
Originally Posted by Eliseat View Post
Okay, to demonstrate whats happening I firstly tried to demonstrate whats going on by comparing Reapers video scaling/zooming to the master of video editing: Premiere Pro

drum roll ... here the result: There is no noticeable different! Scaling as an separate process just works as it should work.

Examples:
Premiere scaling only
Reaper scaling only

BUT then I compared another set up. Scaling AND moving. That's where I found out the step like motion when I tried to make a slideshow. So I set up a scene with a little box moving a bit and scaling a bit. And here you can clearly see the poodles core. Premiere has no problem showing a smooth result while Reaper shows the discussed problem without any sense of shame.

Examples:
Premiere scaling and moving
Reaper scaling and moving (see the little jumps)

Justin, I also tested your alternative scaling preset. But as long as scaling and moving come together, those little jumps still appear.

It seems that Premiere pro also has some problems with scaling and moving at the same time but it smooths the motion kind of so it doesn't show up like hard little steps rather then soft wobbles.
Hmm yes PP seems to look much smoother by default.
(btw Eli all 4 links seem to link to the same folder)
wwwmaze is offline   Reply With Quote
Old 05-06-2019, 07:11 AM   #25
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,215
Default

I can't get smooth zooming.
Using Track opacity/zoom/pan - video processor
filter set to 1
animating zoom parameter with envelope

here are some examples small cropped gifs(captured from exported file from video player) are 25fps and I see them as I see the full exported mp4 25fps videos
they seem like low framerate but the exported videos look the same. That is the problem. The only one that looks like 25fps is the last one with a big zoom parameter, but it still wiggles a bit.

Tell me which one do you think is smoother and if this could be solved.
the image is a cookie.. because.. why not.. and it has a resolution of 3000x1920. Project settings are
  1. video colorspace: Auto
  2. Disabled: Always resize video sources to preferred video size
  3. Disabled: Always resize output to preferred video size
  4. Enabled: Use high quality filtering when resizing
  5. Enabled: Preserve aspect ratio when resizing

zooming in a bit and project settings 640x480 resolution


same zoom move but changed project settings 1920x1080


1920x1080 small zoom zooming from -9 to -6


1920x1080 big zoom zooming from 5 to 8
heda is offline   Reply With Quote
Old 05-17-2020, 02:00 PM   #26
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
Default

Was there any resolution to this? Since it suddenly got quiet a year ago, I assumed this had been fixed... but I'm seeing it now....

Of course, I am doing no arithmetic gymnastics in my code:

Code:
// 'name' [defval minval maxval centval step]
//@param 1:opacity 'Opacity' 1 0 1 0.5 0.01;
//@param 2:zoom 'Zoom' 1 1 5 2.5 0.05
//@param 3:x_offset 'Vert Pan' 0 0 1 .5 0.01 
//@param 4:y_offset 'Horiz Pan ' 0 0 1 .5 0.01

//@param 6:percent_y 'Top' 0.0
//@param 7:percent_x 'Left' 0.0 
//@param 8:percent_h 'Height'  1 0 1 .5 0.01
//@param 9:percent_w 'Width'  1 0 1 .5 0.01
//@param 11:fine_y 'Top-fine' 0 -1 1 0 .01
//@param 12:fine_x 'Left-fine' 0 -1 1 0 .01
//@param 13:fine_h 'Height-fine'  0 -1 1 0 .01
//@param 14:fine_w 'Width-fine'  0 -1 1 0 .01
//@param 16:preserveAspect 'Preserve Aspect' 1 0 1 0 1;

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


input_info(img1,iw,ih);

fine = .01;

original_w = iw;
original_h = ih;
//convert percents to pixels
dest_x = (percent_x + (fine * fine_x)) * original_w;
dest_y = (percent_y + (fine * fine_y)) * original_h;
dest_h = (percent_h + (fine * fine_h)) * original_h * 1.5;
dest_w = (percent_w + (fine * fine_w)) * original_w * 1.5;


src_w = original_w / zoom - .01;
src_h = original_h / zoom - .01;

//todo: limit pan.  when zoom is 1, it should be zero
x_pan = x_offset * zoom ;
y_pan = y_offset * zoom ;

// convert pan(0,1) to a pixel value...
src_Left = (src_w * x_pan) + 1; 
src_Top = (src_h * y_pan) + 1;

gfx_set(1,0,0,opacity);    //(bgc,bgc,bgc,opacity);
gfx_fillrect(0, yt, project_w, txth*(1+border*2));

gfx_mode = 256; //HQ filter always on

//gfx_blit(input,aspect,x,y,w,h,srcx,srcy,srcw,srch);
gfx_blit(img1,preserveAspect,
   dest_x, dest_y,(dest_w)|0,(dest_h)|0,
   src_Top,src_Left,(src_w)|0,(src_h)|0  
   );
so maybe I need to do something, but unclear if anything actually worked...
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Old 05-17-2020, 04:26 PM   #27
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Hi Woodslanding,

its nice that you tried to find a way, but it does not work. You can't get pan and zoom at the same time smooth. Even with the finest course. It seems there is a bug or a misconstruction which doesn't allow pan and zoom at the same time. And its a really big bummer because I wasn't able to use Reaper for my videos since I've found this out.

Anyway. I hope this gets fixed or someone finds a solution. I guess its not a big deal. Sometimes its just know how which is needed. The same thing happened with blur when someone posted an interesting link to a paper where he pointed to a method with a more natural blur effect. Since than we have perfect blur in the video processor.

Thanks
Eli
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
Eliseat is offline   Reply With Quote
Old 05-17-2020, 06:57 PM   #28
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
Default

I guess I will file a FR?
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Old 09-09-2020, 03:21 AM   #29
drew
Mobile
 
drew's Avatar
 
Join Date: Jan 2006
Location: London & São Paulo. Hardcore commercial REAPERite
Posts: 1,669
Default

This is fascinating. I feel like I've come up against this a few times and not realised that was the case - pan and zoom together being the issue.

Not sure what to FR to suggest it being fixable though.

Quote:
Originally Posted by Eliseat View Post
Hi Woodslanding,

its nice that you tried to find a way, but it does not work. You can't get pan and zoom at the same time smooth. Even with the finest course. It seems there is a bug or a misconstruction which doesn't allow pan and zoom at the same time. And its a really big bummer because I wasn't able to use Reaper for my videos since I've found this out.

Anyway. I hope this gets fixed or someone finds a solution. I guess its not a big deal. Sometimes its just know how which is needed. The same thing happened with blur when someone posted an interesting link to a paper where he pointed to a method with a more natural blur effect. Since than we have perfect blur in the video processor.

Thanks
Eli
__________________
Proudly using REAPER exclusively for...
* Media and event music composition & production, sound design + auto-processing at Qsonics.com
* Broadcast branding, promos, education & training and narration voice-overs at DrewWhite.com
drew 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 02:47 AM.


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