Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Pre-Release Discussion

Reply
 
Thread Tools Display Modes
Old 10-14-2021, 08:33 AM   #1
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default command line improvements and how I am using them (move out of dev section once pub)

Hi

In the recent update (1014) there was (im so grateful) an improvement regarding command line stuff.

After this build gets made public maybe this can be moved to a different forum.

Here's the thread:

https://forum.cockos.com/showthread.php?t=258395

What I was trying to do was to be able to right click a video file, and find a way to send it to a new instance of reaper, apply a template (which has a project startup screenset), and also one track with 4 video effects im likely to use, along with render settings ready to go.

I REALLY WISH REAPER HAD OFX SUPPORT and more render options but I love editing in reaper for little clips that might not really need much processing. Or bigger clips that dont!

So, I set it all up and try several different ways to do it.

I end up using the "send to" menu in windows because it seems the easiest.
IN ALL OF THE EXAMPLES BELOW I AM PUTTING MY PROGRAM PATH.

yours might be different. Mine is:

"C:\Portable Programs\Reaper (x64)\reaper.exe"

and this will also reflect in my templates folder:

-newinst -template "C:\Portable Programs\Reaper (x64)\ProjectTemplates\video edit.rpp"

yours might be different like:

"C:\Program Files\Reaper (x64)\reaper.exe"

or

-newinst -template "C:\Program Files\Reaper (x64)\ProjectTemplates\video edit.rpp"

I would love it if someone could guide me through how to make it contextual so it only pops up on mov, mp4, etc etc... but that seems like a long ass process. I was doing that in the beginning but figured it didn't work because of my own ignorance, not because of reaper.

After using the "send to" method, I gave up and made a thread (as I tend to).

As it turns out, reaper doesn't support a template AND a filename, till now.

I'm going to show my process for what I did on windows.

Go to start, type run, and enter

shell:sendto



it will take you to your send to menu.

here, create a shortcut



in the box that pops up, find your reaper.exe - mine is in a non-standard place, yours is likely in Programfiles/Reaper (x64)



next, make a name for it... I would name it according to your task or the template you're opening.



After this, you will have the ability to send any file you want directly to reaper, but that really isn't that helpful.

Next, we have to add parameters to the shortcut to tell reaper what kind of conditions we want when we import that file.

So, set up a template that loads up the workspace you want. I'm sure you know how to set up a project template, if not, look it up, it's a like 30 year old feature.

This is what I have for video:



It's a workspace fit for video (imo) and altho the colors are a bit off (I just upgraded to win11 and I love the darker and rounded colors, but I need some work here) I love it personally.

I have the windows I want exactly where I want them by arranging them, saving a screenset, adding that screenset to the project startup actions, and then saving the template.

I also put 4 video effects I often use in there.

So, cool. I save the template after everything. Don't forget to save it after you make the screenset, the startup action, everything.

I wanted it to open a new instance of reaper, but I don't know if that's needed. Let's include that anyway.

We need to tell the shortcut to:

- open a new instance of reaper
- open it with this particular template (video edit.rpp)
- send this file to it.

right click the shortcut in the send to folder and go to properties, and this will come up

again, ignore the wonky colors, I'll work on that later. As long as reaper looks good idgaf



The "target" box is what we are concerned with.

this is what it has now:

"C:\Portable Programs\Reaper (x64)\reaper.exe"

we need to add some commands to it. There's a full list of commands here:

https://github.com/ReaTeam/Doc/blob/...0parameters.md

You will also see it if you mess up. haha

So we are going to add two commands telling it to open a new instance

-newinst

and to open a template

-template

after that we have to enter a file name.

Since the shortcut is calling reaper.exe within that same directory, I think you can just put a relative path to the template IF it's under the reaper directory so I put:

"ProjectTemplates/video edit.rpp"

I put the quotations because I put a space in the template like a noob. I think you can leave the quotations out if there's no space, not sure. Doesn't hurt if you do.

So the entire thing looks like:

-newinst -template "ProjectTemplates/video edit.rpp"

I did have it looking like this for some reason as I look back at my notepad:

"C:\Portable Programs\Reaper (x64)\reaper.exe" -newinst -template | "C:\Portable Programs\Reaper (x64)\ProjectTemplates\video edit.rpp"

but not anymore. I have feeling that one didn't work.

So save the shortcut and try it out.

It SHOULD open reaper as a newinstance, open a template, the template loads a screenset, and your file gets inserted into reaper.

Boom.

Now, it will load subsequent projects in that same template in that same instance, so maybe if you want a default project that adheres to your typical needs, make sure that template loads a screenset that fits that on startup.

Next steps:

I would love to find an easy way (maybe a .bat files that alters the registry) to have it context sensitive and on the top level of the right click menu, so that when you right click an mp4, it shows the video editing shortcut, and when you click an rpp, it shows a couple of options there, and if you right click a .wav file maybe it opens up a wav editor interface.

But to make those shortcuts you have to do some registry stuff which I'm comfortable with, but since that was my first frustrating foray into this and I was thwarted left and right by a reaper limitation and not my own obvious cognitive deficiencies, I will almost have PTSD going into that. There are TONS of articles online about adding to the right click menu with params.

maybe we can discuss that more here.

thanks devs!

some sources for related things:

https://www.online-tech-tips.com/com...-context-menu/
https://thegeekpage.com/add-any-prog...-context-menu/

Last edited by Jae.Thomas; 10-14-2021 at 09:53 AM.
Jae.Thomas is offline   Reply With Quote
Old 10-14-2021, 08:48 AM   #2
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

you can add it to the right click menu that pops up anywhere if you right click in a blank space in a folder by following this tutorial but when you go to regedit navigate here:


HKEY_CLASSES_ROOT\Directory\Background\shell

making a key named however you want it to show up, in this case I put "reaper"

under that making a key named "command"

right click and make a new string value

and then putting that entire phrase above in the "value data" section

"C:\Portable Programs\Reaper (x64)\reaper.exe" -newinst -template "ProjectTemplates\video edit.rpp"



restart explorer, and you have it!



not sure how helpful this is, but it's a thing.

obviously you can put in whatever params you want.
Jae.Thomas is offline   Reply With Quote
Old 10-14-2021, 09:16 AM   #3
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

ok I got it....

As far as adding contextual right click menus, it's a little more complicated and I don't yet understand it

In the registry, I went to

Computer\HKEY_CLASSES_ROOT

and find the file extension you want it to pop up on

im gonna do .mp4



so I thought this is how it works:

you go do kinda the same thing as above.

You go to shell, then make a key named Reaper Video Edit (or whatever you want), make a new key under that named command, then make a string under that which has the program path and params.

"C:\Portable Programs\Reaper (x64)\reaper.exe" -newinst -template "C:/Portable Programs\Reaper (x64)\ProjectTemplates/video edit.rpp"



But it doesn't seem to pop up even after restarting explorer or putting all this under "shellex" either. I think I have to look more into what those keys do.

So there's another way I've seen this gone about and I don't understand why this is the way it is...

You have to do the SAME thing as above, but not directly on the extension but I think kinda piggybacking on another amp like winamp or VLC that opens mp4. So I found this:



and this is what you get if you put that same string in:



I think that's because it's not a shortcut, so it doesn't have a target already put in. So we have to change the string to an absolute reference I think:



nope. That wasn't it. For some reason I guess it's just staying in that win/sys32 dir and not finding reaper.


hmmmm if I find a file in E:dropbox it is still trying to find the path under that dir...

I think I got it.

I had the path written wrong. It has to be:

"C:\Portable Programs\Reaper (x64)\reaper.exe" -newinst -template "C:\Portable Programs\Reaper (x64)\ProjectTemplates\video edit.rpp" "%1"

the "%1" seems to be what opens the right clicked file.

I am not sure if this explains it right, I've been clicking around a bunch. haha

also, what a hassle to enter it for ALL extensions you need it for. Would be nice to figure out how to make a bat file

Last edited by Jae.Thomas; 10-14-2021 at 09:43 AM.
Jae.Thomas is offline   Reply With Quote
Old 10-14-2021, 09:47 AM   #4
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

adding an icon:

I am snagging this off of the VLC playlist thing:



this basically means it is calling up the exe file and selecting an icon from it - 0 is the default icon.

I think the icon i liked for video was 5 but it would be neat to make more icons for it!

So I'll copy that

go to HKEY_CLASSES_ROOT\VLC.mp4\shell\Edit Video in Reaper

and add a string named "Icon"

and in value data enter:

"C:\Portable Programs\Reaper (x64)\reaper.exe",5

I just put 5 because i think that means the fifth icon



so now I have

Jae.Thomas is offline   Reply With Quote
Old 10-14-2021, 09:56 AM   #5
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

ok so I'm just about worn out from this, but it would be cool if there was some instruction on how to add these entries en masse to the registry, because there is no easy copy and paste from what I see... let me think.....

well I guess you could do this.

Go to the "edit video in reaper" key and right click, and select export. Put the regfile somewhere safe and then right click it and select "edit"

you'll get this:

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VLC.mp4\shell\Edit Video in Reaper]
"Icon"=""C:\\Portable Programs\\Reaper (x64)\\reaper.exe",5"

[HKEY_CLASSES_ROOT\VLC.mp4\shell\Edit Video in Reaper\command]
@=""C:\\Portable Programs\\Reaper (x64)\\reaper.exe"  -newinst -template "C:\\Portable Programs\\Reaper (x64)\\ProjectTemplates\\video edit.rpp" "%1""
what if we copied and pasted this over and over but with different extensions and then added it to the reg?

i added this:

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VLC.mp4\shell\Edit Video in Reaper]
"Icon"="\"C:\\Portable Programs\\Reaper (x64)\\reaper.exe\",5"

[HKEY_CLASSES_ROOT\VLC.mp4\shell\Edit Video in Reaper\command]
@="\"C:\\Portable Programs\\Reaper (x64)\\reaper.exe\"  -newinst -template \"C:\\Portable Programs\\Reaper (x64)\\ProjectTemplates\\video edit.rpp\" \"%1\""


[HKEY_CLASSES_ROOT\VLC.mkv\shell\Edit Video in Reaper]
"Icon"="\"C:\\Portable Programs\\Reaper (x64)\\reaper.exe\",5"

[HKEY_CLASSES_ROOT\VLC.mkv\shell\Edit Video in Reaper\command]
@="\"C:\\Portable Programs\\Reaper (x64)\\reaper.exe\"  -newinst -template \"C:\\Portable Programs\\Reaper (x64)\\ProjectTemplates\\video edit.rpp\" \"%1\""


[HKEY_CLASSES_ROOT\VLC.mov\shell\Edit Video in Reaper]
"Icon"="\"C:\\Portable Programs\\Reaper (x64)\\reaper.exe\",5"

[HKEY_CLASSES_ROOT\VLC.mov\shell\Edit Video in Reaper\command]
@="\"C:\\Portable Programs\\Reaper (x64)\\reaper.exe\"  -newinst -template \"C:\\Portable Programs\\Reaper (x64)\\ProjectTemplates\\video edit.rpp\" \"%1\""
and then i saved it

and then I double clicked the resultant .reg file and added it to the registry.

ok that works!

now for mkv, mp4, mov files, it has that menu. I want to change how it looks too. I don't want it sandwiched between these two.

I think I'd have to start over and just put the key in a different spot.

nope. It appears to be in alphabetical order. Strange.

but what if you don't have VLC installed. Is there a way to have it just find whatever program is the default and then make this happen instead of having to find that out with each different installation?

what if quicktime has the mp4 format, what if winamp has it? This wouldn't work in this case.

Last edited by Jae.Thomas; 10-14-2021 at 10:08 AM.
Jae.Thomas is offline   Reply With Quote
Old 10-14-2021, 10:05 AM   #6
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

ok I hope the 4 hours I spent on this today and yesterday will save more more than 4 hours or at least a reduction in frustration.

Certainly if someone else wants to do it, they won't have to waste as much time
Jae.Thomas is offline   Reply With Quote
Old 10-14-2021, 10:07 AM   #7
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

I think this isn't really totally applicable just to dev/beta builds so if anyone wants to move this before its public go ahead. But I hope it's remembered after the release it out. I found it helpful maybe someone else will!

https://defaultprogramseditor.com/ that might come in handy, not sure

also easy context menu editor is interesting tho I don't think it's applicable here. It helped me kinda see what they were doing.
Jae.Thomas 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 06:37 AM.


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