Shell Script for Batch Processing .RAW Files

Started by mnteddy, May 29, 2013, 03:34:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mnteddy

raw2dng-batch BASH Script for raw2dngOSX on the Mac
Version 1

I had this bash script put together to automate the extraction of DNGs from my .RAW files. I realize it's similar to scrax's raw2dng gui app, but I wanted something with a little more automation to help on an upcoming shoot I have. And I also needed the ability to set the output directory.

If someone knows how to turn this into an app, have at it.

I open up terminal and type "bash" then drag and drop the script into the window

It asks for the following:
1. The folder containing the raw2dng unix executable (drag and drop the folder)
2. The source folder containing the .RAW file(s) (drag and drop the folder)
3. Where you would like the DNGs extracted to (drag and drop the folder)
4. What roll number you would like to use. If no roll number is specified, it see's the last one used, and adds 1.

To make things even more automated, you can alternatively add the variables right in the terminal like this:
> bash raw2dng-batch [raw2dngDir] [sourceDir] [outputDir] [rollNumber](optional)
This is very helpful as you can simply press "Up" "Enter" in Terminal every time you insert a new card, and the script will go to work (works great if you don't specify the roll number, and let it decide for you)

When processing, it creates the following directory structure:
[specified outputDir]/R001/R001_S001-[original .raw filename]/R001_S001-000001.dng
R001="Roll" number (automagically counts up each time processed)
S001="Shot" number (starts at 001 for each "roll" and goes up for every additional shot)

You'll need the raw2dngOSX unix executable to run this script.

Hopefully someone finds this useful.

guentergunter

This script is a great achievement for managing the RAW-files while on set.

However, when trying to use it, it fails with the following message: "Permission denied"
I then tried with 'sudo'. Again an error: "command not found"

I'm using OSX 10.8.3
___

As a slight addition: Would it be possible for you to add support for spanned files (like .RAW + .R00 + .R01 + ...) on the fly?
That is normally (circuitously) done with the 'cat'-command.
5D2 ML RAW + VAF-5D2b: http://vimeo.com/69350650