Magic Lantern Forum

Using Magic Lantern => Raw Video => Raw Video Postprocessing => Topic started by: olik on May 28, 2013, 01:15:49 AM

Title: batch convert dngs to tiff
Post by: olik on May 28, 2013, 01:15:49 AM
Is there a way to batch convert dng-sequences to tiffs? So that we do not have to convert shot by shot?
Title: Re: batch convert dngs to tiff
Post by: notdabod on May 28, 2013, 02:05:29 AM
Select all dng's, right click, open with PS,

https://vimeo.com/66355682
Title: Batch convert DNG sequences to TIFF
Post by: olik on May 28, 2013, 10:18:48 AM
Hey folks,

is there an easy way to batch convert DNGs to TIFF? With Photoshop I can only convert one file at a time. Maybe with AFX?

best regards

O.

EDIT: sorry I was not clear, I meant and easy way to batch-convert the DNG sequences (not individual frames).
Title: Re: Patch convert DNG to TIFF
Post by: Audionut on May 28, 2013, 10:23:10 AM
Adobe Camera Raw can batch convert.  Select all images in Bridge and open with ACR.  Select all images in ACR and save images.
Title: Re: Batch convert DNG to TIFF
Post by: olik on May 28, 2013, 10:30:24 AM
sorry, I was maybe not clear enough. I meant with Photoshop I can only convert all the DNGs from one clip in one go. But what if I want to convert all the clips that I might have in separated folders?
Title: Re: Batch convert DNG to TIFF
Post by: squig on May 28, 2013, 10:31:10 AM
Then you need something like after effects. RawTherapee does batches but it's a bit buggy on the mac.
Title: Re: Batch convert DNG to TIFF
Post by: renevg on May 28, 2013, 11:20:39 AM
http://www.magiclantern.fm/forum/index.php?topic=5645.0  might be the one you want.
Title: Re: Batch convert DNG to TIFF
Post by: renevg on May 28, 2013, 11:26:26 AM
Oops, sorry; you want tiffs, not DNGs.
Why would you want tiffs, if I may ask?
for editing purposes I use the (raw) DNG sequences, not the (converted to 16bit and MUCH larger!) tiffs.
Title: Re: Batch convert DNG to TIFF
Post by: deleted.account on May 28, 2013, 11:47:46 AM
Dcraw will export 16bit Tiffs, you have control over the raw development to start with plus choice of colorspace such as Prophoto, XYZ, AdobeRGB, sRGB or undefined RGB, you have cotrol over WB and gamma, so if you don't have access to raw handling in an editing / grading app 16bit Tiff is one route baking in WB etc but retaining some space (16bit per channel levels) for 'grading'.

Big problem is at 1080P that's 12.8mb per frame. :-)
Title: Re: Batch convert DNG to TIFF
Post by: olik on May 28, 2013, 01:14:08 PM
Quote from: renevg on May 28, 2013, 11:26:26 AM
Oops, sorry; you want tiffs, not DNGs.
Why would you want tiffs, if I may ask?
for editing purposes I use the (raw) DNG sequences, not the (converted to 16bit and MUCH larger!) tiffs.

How do you edit with the DNG sequences? As far as I know, nether FCP nor premiere (or resolve) can import those. You would need to convert it to sth else. As I worked with Photoshop until now to convert my DNGs I choose 16bit tiffs as it seamed a better option for grading than jpgs. I am rendering now with AFX a prores444 of all my dng sequences. But if I could edit the dngs sequences, that would be fantasitic!
Title: Re: batch convert dngs to tiff
Post by: artyg on May 29, 2013, 05:27:42 AM
Quote from: olik on May 28, 2013, 01:15:49 AM
Is there a way to batch convert dng-sequences to tiffs? So that we do not have to convert shot by shot?

I think he was referring to how to automate the process, if there is a lot of folders with DNG. That's a good question, a very vital. Because the test shooting 3-4 plans is one thing, but when they are 100-200, etc. Automation is very relevant question. Who has ideas? (sorry for my English, I write through translator)
Title: Re: batch convert dngs to tiff
Post by: mjneubrander on May 29, 2013, 05:43:54 AM
For windows ... Download dcraw http://www.heliconsoft.com/heliconsoft-products/dcraw/

Add this line to a batch file for the most basic conversion. Execute in the directory you want to make .tiff files.
for /f "usebackq delims=|" %%f in (`dir /b "%CD%\*.dng"`) do dcraw -v -r 2.132483 1.000000 1.480864 1 -H 2 -T -b 3.5 -4 %%f

For .RAW to tiff Make a batch file and add the spoiler below. Should give you even basic white balance.

[spoiler]
@echo off
setlocal enabledelayedexpansion

:again

set thefile="%~1"
REM make directory for extraction of
if "%~1" == "" goto done
mkdir %n%
move %~1 %n%
cd %n%
for %%F in (%thefile%) Do Set _RawName=%%~nxF
..\raw2dng.exe %cd%\%_RawName%
move %_RawName% ..


REM get user choice of white balance
ECHO WScript.Echo InputBox( "What preset would you like to use?"  ^& vbnewline ^& "1 Daylight"  ^& vbnewline ^& "2 Tungsten"  ^& vbnewline ^& "3 Cloudy"  ^& vbnewline ^& "4 Shade"  ^& vbnewline ^& "5 Flourescent"  ^& vbnewline ^& "6 Flash or LED"  ^& vbnewline ^& "7 Default", "Preset", "1" ) > usermessage.vbs
FOR /F "tokens=*" %%A IN ('CSCRIPT.EXE //NoLogo usermessage.vbs') DO SET wb=%%A
del usermessage.vbs

if "%wb%"=="1" (
for /f "usebackq delims=|" %%f in (`dir /b "%CD%\*.dng"`) do dcraw -v -r 2.132483 1.000000 1.480864 1 -H 2 -T -b 3.5 -4 %%f
goto settif
)
if "%wb%"=="2" (
for /f "usebackq delims=|" %%f in (`dir /b "%CD%\*.dng"`) do dcraw -v -r 1.392498 1.000000 2.375114 1 -H 2 -T -b 4.5 -4 %%f
goto settif
)
if "%wb%"=="3" (
for /f "usebackq delims=|" %%f in (`dir /b "%CD%\*.dng"`) do dcraw -v -r 2.336605 1.000000 1.334642 1 -H 2 -T -b 3.5 -4 %%f
goto settif
)
if "%wb%"=="4" (
for /f "usebackq delims=|" %%f in (`dir /b "%CD%\*.dng"`) do dcraw -v -r 2.531894 1.000000 1.223749 1 -H 2 -T -b 3.5 -4 %%f
goto settif
)
if "%wb%"=="5" (
for /f "usebackq delims=|" %%f in (`dir /b "%CD%\*.dng"`) do dcraw -v -r 1.783446 1.000000 1.997113 1 -H 2 -T -b 3.5 -4 %%f
goto settif
)
if "%wb%"=="6" (
for /f "usebackq delims=|" %%f in (`dir /b "%CD%\*.dng"`) do dcraw -v -r  2.429833 1 1.284593 1 -H 2 -T -b 3.5 -4 %%f
goto settif
)
if "%wb%"=="7" (
for /f "usebackq delims=|" %%f in (`dir /b "%CD%\*.dng"`) do dcraw -v -r 2.395443 1.000000 1.253807 1 -H 2 -T -b 3.5 -4 %%f
goto settif
)

:settif

cd..
set /a n+=1
shift
goto again
:done

del *.vbs
pause
exit
[/spoiler]

This is an excerpt from my more full featured batch maker http://www.magiclantern.fm/forum/index.php?topic=5837 which will get you all the way to .mov files.