Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 10-12-2021, 09:50 AM   #1
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,196
Default Reaper command line switches not working

So, I like editing video files quickly in reaper -

I have a template set up and a screenset set up for it.

What I am wondering is if I can right click an .mp4 file (among many other types) and see the "open with" menu have a special entry -

you would have the regular reaper entry which shows up, but more importantly and entry with a different reaper icon that is "edit video in reaper" - or this could also just be in the top right click context menu.

That command would open that file in reaper with passing those template parameters or even a newinst parameter.

is this possible?

Last edited by Jae.Thomas; 10-13-2021 at 12:09 PM.
Jae.Thomas is offline   Reply With Quote
Old 10-12-2021, 10:35 AM   #2
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 28,897
Default

It's mostly possible but you'll either need an existing tool to do it or edit the registry to add them manually. The easy one will be right-click > open reaper - the more finicky one will be right-clicking a particular file extension such as .mp4 and adding that with specific params passed to reaper but you should be able to get close.

A different icon, not so sure about but at any rate, try search criteria like this and this, then start digging.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 10-12-2021, 06:18 PM   #3
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,196
Default

yeah, I have been trying different utilities, etc...

so many searches hahah

so much registry eye burn in

but it doesn't seem to open the file in reaper, but it does apply the template/screenset.

I don't know, it's a tough one!

at this point I may have lost more time than I would have saved over the next few years by having it
Jae.Thomas is offline   Reply With Quote
Old 10-13-2021, 07:40 AM   #4
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,196
Default

Just experimented using the "send to..." list - and that does open reaper with the right template, but doesn't put the file I specified in it

I did it by making a shortcut to this cmd file:

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

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

when I make an actual shortcut from scratch in the sendto menu (not using a cmd file shortcut) with the same params, it just brings up the reaper param usage box and doesn't open reaper
Jae.Thomas is offline   Reply With Quote
Old 10-13-2021, 08:30 AM   #6
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 28,897
Default

It sounds like whatever it is is tricking reaper into thinking it needs to open the cmd dialog.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 10-13-2021, 08:31 AM   #7
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,196
Default

Quote:
Originally Posted by karbomusic View Post
What params are you passing? It sounds like whatever it is is tricking reaper into thinking it needs to open the cmd dialog.
-newinst -template "C:\Portable Programs\Reaper (x64)\ProjectTemplates\video edit.RPP

but I have used a few different ways to do this, with a cmd file, and also just editing the sendto shortcut
Jae.Thomas is offline   Reply With Quote
Old 10-13-2021, 09:04 AM   #8
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 28,897
Default

Found the problem. I think this might be broken or I'm misinterpreting? But optional params are pretty simple to read. The cmd options in reaper are clearly shown as:

reaper.exe [options] [filename.rpp] [filename.wav]

At first glance, my thought was you should remove -template but leave the project file name of the template to respect the above, then just make sure you Save As once it loads but...

... it doesn't work and I kind of think it should because that respects the cmd line available params above in bold. I know this because I pulled the command line via process explorer (the result of the SendTo) when it should have loaded but instead popped up the cmd line dialog:



*** And yes I tested by passing .wav instead of .mov so that isnt it.

@Justin?
__________________
Music is what feelings sound like.

Last edited by karbomusic; 10-13-2021 at 09:17 AM.
karbomusic is offline   Reply With Quote
Old 10-13-2021, 09:46 AM   #9
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,196
Default

well, im trying to pass the file im right clicking on to reaper.

I will re-read but just want to make sure im explaining it right

ahh so that's process explorer above.. I will check that out

basically it would be cool to have a right click menu of reaper configs or templates to open up certain files in windows explorer in
Jae.Thomas is offline   Reply With Quote
Old 10-13-2021, 10:07 AM   #10
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 28,897
Default

Quote:
Originally Posted by Jae.Thomas View Post
well, im trying to pass the file im right clicking on to reaper.

I will re-read but just want to make sure im explaining it right

ahh so that's process explorer above.. I will check that out

basically it would be cool to have a right click menu of reaper configs or templates to open up certain files in windows explorer in
Yes, you explained it fine. You want one or more shortcuts so you can right-click > SendTo > Reaper so that it opens template X with video file Y .... what I'm saying is it's probably broken in Reaper, because if I strip it down to just reaper.exe someproject somefile it still doesn't work and based on the command line options it should:



So I checked with Process Explorer to confirm that's what reaper was passing, it was and it failed. Or you'd like to do this with a context menu but if the reaper cmd options aren't working as expected it doesn't matter what method you try.
__________________
Music is what feelings sound like.

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

ahhh ok.

Is there some kind of code that lets "sendto" know you're sending that particular file you right clicked onto the program?
Jae.Thomas is offline   Reply With Quote
Old 10-13-2021, 10:23 AM   #12
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 28,897
Default

Quote:
Originally Posted by Jae.Thomas View Post
ahhh ok.

Is there some kind of code that lets "sendto" know you're sending that particular file you right clicked onto the program?
Yea, that's want SendTo does, it just appends the path of the right-clicked SendTo file to the shortcut

Let's take all that out of the picture to better explain. Open CMD.exe and paste this in, you should see the same problem:

"C:\Portable Programs\Reaper (x64)\reaper.exe" "C:\Portable Programs\Reaper (x64)\ProjectTemplates\video edit.RPP" "C:\Videos\MyVideo.mp4"

Where you change "C:\Videos\MyVideo.mp4" to the actual path of a video you have (this is just a manual version of what SendTo does). It should still fail, but reaper's cmd options state that it should work...

__________________
Music is what feelings sound like.

Last edited by karbomusic; 10-13-2021 at 10:29 AM.
karbomusic is offline   Reply With Quote
Old 10-13-2021, 11:38 AM   #13
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,196
Default

yes it does fail. thanks

hopefully this can be fixed. Might not be a huge priority, but I can see it being pretty useful for me.
Jae.Thomas is offline   Reply With Quote
Old 10-13-2021, 12:07 PM   #14
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 28,897
Default

Maybe edit title to something like "Reaper command line switches not working as expected" or something so maybe Justin sees it. Just thinking out loud.

Command line args can be persnickety but it looks like it's having problems reading multiple entries that are files. Need Justin or Schwa to chime in, in case there is a trick to it we missed or haven't figured out.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 10-13-2021, 12:09 PM   #15
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,196
Default

done, thanks for the help
Jae.Thomas is offline   Reply With Quote
Old 10-13-2021, 12:11 PM   #16
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 28,897
Default

Take care man, still hope you make it down this way sometime.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 10-13-2021, 12:17 PM   #17
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,196
Default

Quote:
Originally Posted by karbomusic View Post
Take care man, still hope you make it down this way sometime.
Probably in the winter I'm going south for a bit, I think by that point, we will have been through the worst of the remnant... I hope
Jae.Thomas is offline   Reply With Quote
Old 10-13-2021, 12:25 PM   #18
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 13,708
Default

Passing two filenames (like a template and a media file) via the command line is not yet supported, unfortunately.
schwa is offline   Reply With Quote
Old 10-13-2021, 12:27 PM   #19
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,196
Default

Quote:
Originally Posted by schwa View Post
Passing two filenames (like a template and a media file) via the command line is not yet supported, unfortunately.
ahhh ok, that makes sense then. Hopefully this can happen! I think we could have some cool ways of loading certain file types or projects w/certain params!

thanks for your input Schwa!
Jae.Thomas is offline   Reply With Quote
Old 10-13-2021, 04:27 PM   #20
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 28,897
Default

Quote:
Originally Posted by schwa View Post
Passing two filenames (like a template and a media file) via the command line is not yet supported, unfortunately.
Looks like the param dialog might be wrong since it shows two filenames - that's the main reason we hoped you'd chime in.



We tested that as reaper.exe rppFile wavFile
__________________
Music is what feelings sound like.

Last edited by karbomusic; 10-13-2021 at 04:32 PM.
karbomusic is offline   Reply With Quote
Old 10-14-2021, 07:46 AM   #21
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,196
Default

anyone else trying to get this work, I suggest you visit the pre-release discussion forum for some good news.
Jae.Thomas is offline   Reply With Quote
Old 10-14-2021, 10:04 AM   #22
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,196
Default

this isn't just dev, it's also informative otherwise, so here

command line improvements and how I am using them (move out of dev section once pub)

Last edited by Jae.Thomas; 10-14-2021 at 10:24 AM.
Jae.Thomas is offline   Reply With Quote
Old 10-31-2021, 12:45 AM   #23
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 3,633
Default

Please support also this command:
reaper -renderproject -timeselection -duration 120 magic.RPP
I wrote more about it here: https://forum.cockos.com/showthread.php?t=259020
TonE 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 10:41 PM.


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