Old 12-07-2018, 07:40 AM   #1
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 812
Default Preventing zoom of picture in video-window

I tried doing video editing in Reaper some time ago and it was quite cool, but it had one great flaw, that I didn't know how to get rid of.

When I had a picture inserted into my video-project, for overlay graphics, logos, etc, they were always zoomed when not being in the resolution of the video.
Sure, I could now open a gfx-application, create a picture with the correct resolution, place my logo in there and reimport it into Reaper, but, to be honest: I just want a picture of, say, 100x120 pixels stay 100x120 pixels in the video, no matter what.

Now my question, how can I prevent that automatic zooming? Even if I would need to use some kind of videoprocessor-code to achieve that.

Especially when putting zooming-effects on other videos(don't remember, if I put them as Item or TrackFX, though), this zooming and blurring happened all the time, looking ugly.

I don't want to use another video-editor, just to place some graphics into my video.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 12-07-2018, 07:54 AM   #2
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 986
Default

Yes, that's what I also recognized. I managed it by putting the logo - like you mentioned - in Photoshop in a blank screen as big as the source video. This was the best solution because no scaling took place and the image was sharp and crisp. But I also wondered why it didn't get recognized with original size in the first place.

Unfortunately I have found no other solution.

Eliseat is offline   Reply With Quote
Old 12-09-2018, 02:42 PM   #3
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 812
Default

Ahh...a pity. Hope this gets fixed at anytime.
I think, it's Feature Request time, then

Thanx for helping
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 12-09-2018, 07:13 PM   #4
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,856
Default

You could put a video processor on your monitoring FX which would be:

Code:
project_w=1280;
project_h=720;
gfx_fillrect(0,0,project_w,project_h);
input_info(0,w,h) && gfx_blit(0,0, (project_w-w)/2,(project_h-h)/2,w,h);
You should set the project_w/project_h values in the processor to your video window's size (or set the video window to auto-resize to the values specified, either way)
Justin is online now   Reply With Quote
Old 12-10-2018, 11:43 AM   #5
JamesPeters
Human being with feelings
 
JamesPeters's Avatar
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 2,168
Default

In the video processor preset "Overlay: Image overlay", I had noticed that you can change 2 lines to avoid resizing images.

Change these two lines:

Code:
  dw = (project_w*z)|0;
  dh = (sh*project_w/sw*z)|0;
To these:

Code:
    dw = (sw*z)|0;
    dh = (sh*z)|0;
Then hit CTRL+S to save the change. (I then saved the preset as a new preset with "no zoom" appended to the name.)

I was guessing at this since I don't really understand the code, but I figured it couldn't hurt to try it.

I don't know if this is something that can be added into the preset as an option?
__________________
http://petersamplification.com
Core i3-6300 - MSI B150M Mortar - 8 GB RAM - Asus Xonar DX - MX Linux (MX-18_x64) - REAPER for Linux
JamesPeters is offline   Reply With Quote
Old 12-11-2018, 08:42 AM   #6
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 812
Default

Thanks Justin and James, I'll give it a try
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 12-11-2018, 12:05 PM   #7
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 986
Default

JamesPeters, that worked pretty well. Many thanks!
Eliseat is offline   Reply With Quote
Old 12-11-2018, 03:18 PM   #8
JamesPeters
Human being with feelings
 
JamesPeters's Avatar
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 2,168
Default

I'm no programmer, but sometimes I guess right based on context. I expect that what I did might cause an issue under some circumstances, but it seems to work fine for me.
__________________
http://petersamplification.com
Core i3-6300 - MSI B150M Mortar - 8 GB RAM - Asus Xonar DX - MX Linux (MX-18_x64) - REAPER for Linux
JamesPeters 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 05:04 PM.


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