Need a script to automate processing

Discussion regarding all scripting related questions
Please DO NOT post to this thread anything that is not directly related to scripting of Capture One.

Need a script to automate processing

Postby NN170844UL » Tue Nov 12, 2019 8:28 pm

I am hoping to find someone to write a script for me. I am looking for a script to watch the CAPTURE folder, apply a recipe and process to another folder as long as the script is running. I can not find a way to do this out of the box, but someone suggested I try to find someone here to help me.

Thanks in advance
NN170844UL
 
Posts: 5
Joined: Sun Nov 22, 2009 8:19 am

Re: Need a script to automate processing

Postby emorydunn » Thu Nov 14, 2019 6:45 am

Hi, I'd be happy to help you out with that. Capture One has a feature that isn't terribly well documented that will let you set a script to be triggered on certain events, one of which is capturing a photo. From there you can get the latest captured photo, apply any adjustments you need, and process.

I've written a plugin that makes setting background scripts a bit easier: https://lostcause.photo/projects/scriptsetter/
User avatar
emorydunn
 
Posts: 31
Joined: Fri Jun 14, 2013 7:36 am
Location: San Francisco, California

Re: Need a script to automate processing

Postby NN170844UL » Thu Nov 14, 2019 7:47 am

I see you are in SF as well. Would you be open to writing a script with this functionality? Possible to have it keep running until stopped so that all images incoming are found by the script, have a recipe applied and output to a destination folder?
NN170844UL
 
Posts: 5
Joined: Sun Nov 22, 2009 8:19 am

Re: Need a script to automate processing

Postby NN170844UL » Thu Nov 14, 2019 7:51 am

I see you are in SF as well. Would you be open to writing a script with this functionality? Possible to have it keep running until stopped so that all images incoming are found by the script, have a recipe applied and output to a destination folder?

Also I can not install your software and get an error when trying -
NN170844UL
 
Posts: 5
Joined: Sun Nov 22, 2009 8:19 am

Re: Need a script to automate processing

Postby emorydunn » Sun Nov 17, 2019 8:28 pm

Yeah, I live over in the East Bay. I can write a script for that. The script wouldn't so much run in the background as be called by Capture One every time a photo is taken. Do you want to apply adjustments to new images or just process them with a specific recipe?

What error are you getting when installing the plug-in?
User avatar
emorydunn
 
Posts: 31
Joined: Fri Jun 14, 2013 7:36 am
Location: San Francisco, California

Re: Need a script to automate processing

Postby NN170844UL » Sun Nov 17, 2019 8:44 pm

I can not now recreate the error. What would you charge to write the script and could it be made to run in the background, would that be disadvantageous and if C1 is called every time a photo comes in, woudl it strain resources significantly if we are shooting say 10-20 at a time?
NN170844UL
 
Posts: 5
Joined: Sun Nov 22, 2009 8:19 am

Re: Need a script to automate processing

Postby NN170844UL » Sun Nov 17, 2019 8:45 pm

Also, is there a way to DM in this forum?
NN170844UL
 
Posts: 5
Joined: Sun Nov 22, 2009 8:19 am

Re: Need a script to automate processing

Postby rapdigital » Fri Nov 22, 2019 12:45 pm

Hey Emery
Nice plugin congrats.

Have you noticed speed differences between setting a capture done script and have a script in the background scripts folder that gets passed arguments directly from the app, with "on CO_BatchJobFinished(jobUUID, rawFilePath, outputPathList)" ?

I'm seeing a second or two slower if using a capture done script.
rapdigital
Certified Professional
Certified Professional
 
Posts: 187
Joined: Mon Feb 02, 2009 1:52 pm

Re: Need a script to automate processing

Postby emorydunn » Fri Nov 22, 2019 7:21 pm

Thanks, I hope people are finding the plugin helpful.

Where are you seeing the slowdown? Did you find that a script set via "capture done script" runs slower/ slows Capture One down over the background script handler?

Also, do you know if there's any definitive documentation on the background script handlers? I've only seen a few references made by you over the years about them. A little spelunking shows that there are several, some of which have 0 results on Google. I specifically can't get "CO_CaptureStarted" working.
User avatar
emorydunn
 
Posts: 31
Joined: Fri Jun 14, 2013 7:36 am
Location: San Francisco, California

Re: Need a script to automate processing

Postby murphysm2342 » Thu Jan 23, 2020 8:23 pm

emorydunn wrote:Hi, I'd be happy to help you out with that. Capture One has a feature that isn't terribly well documented that will let you set a script to be triggered on certain events, one of which is capturing a photo. From there you can get the latest captured photo, apply any adjustments you need, and process.

I've written a plugin that makes setting background scripts a bit easier: https://lostcause.photo/projects/scriptsetter/


Hi Emory,
This is a really cool plugin you've made. Can't wait to try it out. Is it still the case where you can only have one script active for each of these action triggers? And they always run when set until you clear the script associate with the action?

I am exploring using the Processing Done script but our users will not always want it run. Probably 10% of the time they need to process out without the Process Done script. Wondering what kinds of workarounds there might be for this.
Thanks
Sean
murphysm2342
 
Posts: 4
Joined: Tue Aug 18, 2015 10:23 pm

Re: Need a script to automate processing

Postby emorydunn » Thu Jan 23, 2020 9:28 pm

murphysm2342 wrote:
emorydunn wrote:Hi, I'd be happy to help you out with that. Capture One has a feature that isn't terribly well documented that will let you set a script to be triggered on certain events, one of which is capturing a photo. From there you can get the latest captured photo, apply any adjustments you need, and process.

I've written a plugin that makes setting background scripts a bit easier: https://lostcause.photo/projects/scriptsetter/


Hi Emory,
This is a really cool plugin you've made. Can't wait to try it out. Is it still the case where you can only have one script active for each of these action triggers? And they always run when set until you clear the script associate with the action?

I am exploring using the Processing Done script but our users will not always want it run. Probably 10% of the time they need to process out without the Process Done script. Wondering what kinds of workarounds there might be for this.
Thanks
Sean


Thanks! I'm glad you find it helpful. You're correct, each trigger can only have one script and it will be called every time. Your script can call other scripts, though.

That being said, what your script does doesn't have to happen on every call. Are there any repeatable conditions for that 10% that would allow you to filter? Or you could use an external setting that would temporarily disable the action (but not unset the script).
User avatar
emorydunn
 
Posts: 31
Joined: Fri Jun 14, 2013 7:36 am
Location: San Francisco, California

Re: Need a script to automate processing

Postby NNN637149307921824277 » Sat Feb 01, 2020 11:48 am

It take that script and schedule it using scheduling software that is usually built into the operating system of the server that it's executing on.
NNN637149307921824277
 
Posts: 5
Joined: Sat Jan 18, 2020 8:53 am

Re: Need a script to automate processing

Postby Tuco403 » Sat Feb 22, 2020 1:54 am

Hello,

I have a similar (maybe identical) need as the original poster. In my case, I'm shooting in high volume at a live event, so I need the best quality to give to the client later, and lesser quality versions of the same as immediate deliverables for members of the public.

In a nutshell:

Need to Shoot Raw for creative control/archive for client.
Need Processed/resized JPEGs immediately after capture for Point-of-Sale (Printing, Social Media, etc).
Need this processing to occur automatically in background while shooting.

For years i've used a stable, but slightly convoluted workflow involving Capture+Lightroom+3rd Party Lightroom Plugin. It's been working, but I'd love to be able to streamline my process.

I've been poking through these message boards, and it seems scripting is the answer, probably quickly extracting jpeg via a QuickProof recipe.

I've seen some helpful posts from Eric Nepean here:
http://forum.phaseone.com/en/viewtopic.php?f=70&t=29599
and here:
https://forum.phaseone.com/En/viewtopic.php?f=70&t=28549

However, being a newbie, I'm having a hard time figuring out the workflow and syntax for all this. I've poked around the Applescript dictionary, but am still struggling to understand. I think that what I need to do is run a Capture Done script that points to another script with the process recipe instructions? But without a solid grasp of how Applescript plays with Capture yet, I guess I don't quite understand the order of operations and if these scripts are run within Capture One, or separately.

I feel like i'm seeing some trees, but don't quite have the vision to see the forest yet. Apologies if this has been answered ad nauseam already. I've looked into this off and on for years, but haven't found the magic answer yet.

Any guidance would be greatly appreciated! Thanks!
Tuco403
 
Posts: 2
Joined: Sun Jul 23, 2017 9:51 pm
Location: Los Angeles

Re: Need a script to automate processing

Postby emorydunn » Sat Feb 22, 2020 2:53 am

Using a Capture Done script to auto-process is exactly right.

There are two types of background scripts, and depending which one you're using getting the latest capture is different. The easiest is to make a script in the Background Scripts folder like this:

Code: Select all
on CO_CaptureDone(rawFilePath)
   tell application "Capture One 12"
      process rawFilePath recipe "Your Recipe Name"
   end tell
end CO_CaptureDone


You'll have to move the script out of the folder to disable it and remember to put it back when you're on location. This might be something I'll take a stab at building a C1 plugin for.
User avatar
emorydunn
 
Posts: 31
Joined: Fri Jun 14, 2013 7:36 am
Location: San Francisco, California

Re: Need a script to automate processing

Postby Tuco403 » Mon Feb 24, 2020 9:58 pm

Hi Emory,

Thank you so much for this! I've just tried it out, and I can see that it's trying to do what it's supposed to, but I'm still hitting a wall.

I'm using the Sony Licensed version of Capture One Pro 10. Will upgrade if need be.

I simply copied your script, changed it to match my version of Capture and the Recipe name i created, and saved it to the Background Scripts folder.

When I capture a photo, i can tell the action is triggered, but the result is an immediate window showing an error in the event log that says: "Could not process file." The more detailed description:

Description: There was an error during the processing of the output file.
File: /Users/USER/Pictures/Capture Test/Test Session/Capture/Test Session3615.ARW
Domain: com.phaseone.captureone
Code: 9

What's interesting is that the raw files appear in the History tab of the Batch tool, which tells me the logic of the script is working, but something is gumming up the works.

Thinking that possibly it was trying to process the raw file before being fully written, I tried a delay command of Delay -1 before the process command. With this addition, the script functions as intended, but only if I shoot very slowly, and fails as soon as I attempt to shoot at the rate I would for the job at hand. Delay values <1 didn't work.

Any thoughts on how to get around this? Is there any way to add freshly captured images to the Processing Queue, and then tell it to process? Not sure if a buffer like this would do anything.

Thank you!

John
Tuco403
 
Posts: 2
Joined: Sun Jul 23, 2017 9:51 pm
Location: Los Angeles

Next

Return to Scripting



Who is online

Users browsing this forum: No registered users and 1 guest