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

Reply
 
Thread Tools Display Modes
Old 05-07-2023, 12:54 PM   #1
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default is there a way to crop video output to a different aspect ratio?

example: I import a video of 1280x700 and I would like to crop to say a 5:5 and then render. Is this possible?
__________________
🙏🏻
deeb is offline   Reply With Quote
Old 05-07-2023, 04:49 PM   #2
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by deeb View Post
example: I import a video of 1280x700 and I would like to crop to say a 5:5 and then render. Is this possible?
Altough there are other custom crop tools around, the one I published in this post should do the trick: https://forum.cockos.com/showthread.php?p=2534698
papagirafe is offline   Reply With Quote
Old 05-07-2023, 06:30 PM   #3
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,568
Default

"I would like to crop to say a 5:5"

doesn't make sense

do you mean 700 x 700 square?

project settings- video
set your frame size
uncheck all options to automatically resize

then you might need to adjust framing with a plugin
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 05-09-2023, 01:11 AM   #4
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

thank you so much papagirafe and EpicSounds for the input. With your help i am able to do what i want. Still need to spend more time to fully understand what i can do tho
__________________
🙏🏻
deeb is offline   Reply With Quote
Old 09-10-2023, 05:14 AM   #5
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 3,012
Default

I'm struggling finding a way to crop a video to a certain output width and height without getting any black borders encoded with it. For example, how can I have a source video (1920x1080) cropped to something like 1920x920 while keeping the original proportions and with no black areas, just the cropped content?

.
__________________
Check out AVConvert (free, super-fast media file manipulation via the right-click context-menu in Windows Explorer) and my free VST plugins.
My Reaper tutorials and studio related videos on youtube.
SonicAxiom is offline   Reply With Quote
Old 09-10-2023, 07:48 AM   #6
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by SonicAxiom View Post
I'm struggling finding a way to crop a video to a certain output width and height without getting any black borders encoded with it. For example, how can I have a source video (1920x1080) cropped to something like 1920x920 while keeping the original proportions and with no black areas, just the cropped content?

.
Its all a question of video context and that is one major problem with the stock presets. The GiraFX lib, even in the starter kit version, deals with that by design. If you are looking quick one shot deal, here is how to proceed. First you must set the project dims to 1920x920 (for example). Then use this preset.
Code:
//q&d cropper
input_info(0,sw,sh)?(
  fw=1920; fh=920;           //final dimensions
  gfx_img_resize(-1,fw,fh);
  sx=floor((sw-fw)/2+0.5);   //rounded
  sy=floor((sh-fh)/2+0.5);
  gfx_blit(0,0, 0,0,fw,fh, sx,sy,fw,fh);
);

Last edited by papagirafe; 09-10-2023 at 07:52 AM. Reason: reversed variabes...
papagirafe is offline   Reply With Quote
Old 09-10-2023, 10:00 AM   #7
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 3,012
Default

Quote:
Originally Posted by papagirafe View Post
Its all a question of video context and that is one major problem with the stock presets. The GiraFX lib, even in the starter kit version, deals with that by design. If you are looking quick one shot deal, here is how to proceed. First you must set the project dims to 1920x920 (for example). Then use this preset.
Code:
//q&d cropper
input_info(0,sw,sh)?(
  fw=1920; fh=920;           //final dimensions
  gfx_img_resize(-1,fw,fh);
  sx=floor((sw-fw)/2+0.5);   //rounded
  sy=floor((sh-fh)/2+0.5);
  gfx_blit(0,0, 0,0,fw,fh, sx,sy,fw,fh);
);
Thank you so much, mate! Much appreciated! Works like a charm. This should absolutely be a Reaper stock preset! Your GiraFX project looks amazing! Outstanding work! I'll probably try it in the future.

Um abraço, amigo!

.
__________________
Check out AVConvert (free, super-fast media file manipulation via the right-click context-menu in Windows Explorer) and my free VST plugins.
My Reaper tutorials and studio related videos on youtube.
SonicAxiom is offline   Reply With Quote
Old 09-10-2023, 10:58 AM   #8
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by SonicAxiom View Post
Thank you so much, mate! Much appreciated! Works like a charm. This should absolutely be a Reaper stock preset! Your GiraFX project looks amazing! Outstanding work! I'll probably try it in the future.

Um abraço, amigo!

.
De nada! You can do the same with stock presets but its not as easy to do and to explain.
papagirafe is offline   Reply With Quote
Old 09-10-2023, 11:56 AM   #9
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 3,012
Default

I just tried the cropping preset in another project and I couldn't get it to work. The project includes alternating video clips of 4k and 1080p resolution crossfaded into each other on the same track and also a logo overlay track. The output should be 3840x1800. This is what I saved in the cropping preset and in the render dialog.

I tried checking and unchecking the options in the project preferences ("always resize video source ..." and "always resize output ...") but it didn't work. Preferred video dimensions were set to 3840x1800. I finally tried putting the cropping effect on a folder above all other video tracks but the video never came out properly cropped (it was just down-sized).

Any help is much appreciated!

.
__________________
Check out AVConvert (free, super-fast media file manipulation via the right-click context-menu in Windows Explorer) and my free VST plugins.
My Reaper tutorials and studio related videos on youtube.
SonicAxiom is offline   Reply With Quote
Old 09-10-2023, 12:23 PM   #10
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by SonicAxiom View Post
I just tried the cropping preset in another project and I couldn't get it to work. The project includes alternating video clips of 4k and 1080p resolution crossfaded into each other on the same track and also a logo overlay track. The output should be 3840x1800. This is what I saved in the cropping preset and in the render dialog.

I tried checking and unchecking the options in the project preferences ("always resize video source ..." and "always resize output ...") but it didn't work. Preferred video dimensions were set to 3840x1800. I finally tried putting the cropping effect on a folder above all other video tracks but the video never came out properly cropped (it was just down-sized).

Any help is much appreciated!

.
I tried with stock presets and it's not that complex after all :-) but you have to know what you are doing.
Step 1: set the project dims to the target size
step 2: insert a "Overlay: Overlay image" preset on your source
that's all!
papagirafe is offline   Reply With Quote
Old 09-10-2023, 12:35 PM   #11
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 3,012
Default

Thanks for your reply! Unfortunately, I still don't get it to work. I'm already using the overlay preset to overlay a permanent logo over the track with mixed 4k and 1080p footage. I also tried putting the overlay preset on this track but it didn't change anything.

.
__________________
Check out AVConvert (free, super-fast media file manipulation via the right-click context-menu in Windows Explorer) and my free VST plugins.
My Reaper tutorials and studio related videos on youtube.
SonicAxiom is offline   Reply With Quote
Old 09-10-2023, 02:12 PM   #12
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by SonicAxiom View Post
Thanks for your reply! Unfortunately, I still don't get it to work. I'm already using the overlay preset to overlay a permanent logo over the track with mixed 4k and 1080p footage. I also tried putting the overlay preset on this track but it didn't change anything.

.
Like I said, all is a question of context with stock presets and I always ended up looking under the hood to tweak them to solve problems...
papagirafe is offline   Reply With Quote
Old 09-10-2023, 02:33 PM   #13
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 3,012
Default

Is there a way to have a video come out in the dimension specified in the render dialog no matter what the input dimensions of the clips on the timeline are? It's one of the most basic and essential requirements the video processor/rendering engine should meet.

.
__________________
Check out AVConvert (free, super-fast media file manipulation via the right-click context-menu in Windows Explorer) and my free VST plugins.
My Reaper tutorials and studio related videos on youtube.
SonicAxiom 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 01:51 AM.


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