Author Topic: [WINDOWS] simple right clic menu mlv dump batch  (Read 50011 times)

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #100 on: August 13, 2017, 11:45:39 AM »
Great. Might be worth a thread on its own. Or if the original poster could update the first post.
Anyway. I was thinking of putting in a possibility to assign another output folder, an external drive for instance. I'll see what I can do.

Kharak

  • Hero Member
  • *****
  • Posts: 943
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #101 on: August 13, 2017, 11:52:39 AM »
Assigning a different output folder would be very nice. Conversion could be done on internal SSD's for greater speed and the output moved to externals. Only bottleneck would be transfer speed, but if a normal external drive has more than 50% space available, the speed should be fine. ~80-90 MB/s.
once you go raw you never go back

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #102 on: August 13, 2017, 11:59:56 AM »
Yes bottlenecks. Anyway. If it's not too hard to do(combine with powershell script for instance) I 'll smack it into the menu.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #103 on: August 15, 2017, 04:12:56 PM »
batch_mlv
https://bitbucket.cc/Dannephoto/batch_mlv/downloads/batch_mlv_in-out.zip

Code(branch) here:
https://bitbucket.cc/Dannephoto/batch_mlv/commits/710151b296a35e0eec85e254f37cdd5d9576a88a?at=batch_mlv_in-out

I focused on setting an input folder instead of having to put all MLV files inside a folder next to the batch file. It is pretty straight forward using powershell combined with cmd.exe scripting.

1 - Double click the batch_mlv.bat file from inside it´s folder. Select a folder with MLV files when prompt opens. Press OK.


Some additional stuff. If you like to set a new output location of the dng folders you can do so by selecting O from the menu.
2 - Select O and choose an output folder. Press OK.


output prompt


Now just select stuff from the main menu and when ready press r to run processing.

Note. If you´re into darkframes it still works even when exporting to new output folders etc. Simply keep your darkframes stashed next to the bin and batch_mlv.bat file like before and any matching darkframes will be applied to the footage.

Thanks Kharak for helping testing giving feedback. Needed and appreciated.

mothaibaphoto

  • Senior
  • ****
  • Posts: 392
  • pesky kid
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #104 on: August 16, 2017, 06:36:13 PM »
Hello, Danne!!! Thank you for your efforts to make command line applications more user friendly :)
I want to make clear what versions of mlv_dump exists and what is the difference.
So, we have "vanilla", "steroids" and yours, right? Or no?
First you wrote: "I´m using ml-dng code(dmilligan) mixing g3gg0 code from crop_rec_4k branch and a lot of stuff from Bouncyball."
Then: "I started out with a ml-dng mlv_dump version I use in cr2hdr.app but then I thought of why not use mlv_dump for steroids by Bouncyball so here we go."
But, mlv_dump.exe in batch_mlv_in-out.zip is something different (at least in byte size) than i download from "steroids" thread. So, if you still include your own binary, please, explain what is the difference and why.
Thank you.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #105 on: August 16, 2017, 07:33:14 PM »
New version up
batch_mlv
https://bitbucket.org/Dannephoto/batch_mlv/downloads/batch_mlv_in-out.zip

There were issues before when going from one drive to another. Hopefully fixed now. If somebody could test the behaviour I would be greatful. Kharak noticed this one.


@mothaibaphoto. I´m using Bouncyball version of mlv_dump here_
http://www.magiclantern.fm/forum/index.php?topic=18975.0

Like the name suggests he beefed up this version with a lot of code from mlvfs for instance. He also put in some of his own stuff in there. Exactly what you´ll find out in the link provided. batch_mlv don´t know how to use all of it but I think I got the most important stuff in the menu.
About the size difference I can´t say why. If you like you can just change my version to the one from Bouncyball thread and rename it to mlv_dump. Should work the same.


Kharak

  • Hero Member
  • *****
  • Posts: 943
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #106 on: August 16, 2017, 09:12:24 PM »
Still having issues with this latest IN OUT version on Win 10.

Would be nice if someone else on Win 10 could test, to see if it is this machine or something else. The Beta or Alpha version of this was working.
once you go raw you never go back

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #107 on: August 16, 2017, 09:20:19 PM »
Just checked. Works but when spaces in the script folder it will break. Will check into it.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #108 on: August 16, 2017, 10:19:04 PM »

Kharak

  • Hero Member
  • *****
  • Posts: 943
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #109 on: August 16, 2017, 10:26:49 PM »
Works on Win 10 now :)

This is basically an app now. No need for keeping batch.cmd, Bin files and Darkframes in same folder as MLV. Just add a shortcut to Batch.cmd on desktop run it like any other processing app.

Thank you, Danne. This was much needed for Windows user looking for batch processing together with Darkframe Automation! Can't wait to really put this to work on my current projects!
once you go raw you never go back

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #110 on: August 16, 2017, 10:37:35 PM »
Great Kharak. Hopefully all works otherwise keep me posted :).
Now let's see if we can narrow down that strange corruption thingy in the steroid thread.

GianlucaM83

  • New to the forum
  • *
  • Posts: 19
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #111 on: August 18, 2017, 07:39:05 AM »
I have a problem with 10 bit raw. In windows 10 x64, with last version of batch_mlv
 If i chose --black-fix=2048 (even with other black values), all my output dng are completely black and if i try to open these files in after effect it gives me an error.
no problems with 14 bit raw.
Same  thing with this version of mlv_dump.exe used in command line Instead no problem with another version of mlv_dump 1.0

I do not know if it is useful but I share two dng files processed with  batch_mlv So you can analyze it.
Sorry for my bad english

https://drive.google.com/open?id=0BxlbVKE4BR0rQVBPdFkzVTlleXc
https://drive.google.com/open?id=0BxlbVKE4BR0rRjFsV2ZOcGs4bG8





Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #112 on: August 18, 2017, 08:13:02 AM »
Try set it to blacklevel 125.

GianlucaM83

  • New to the forum
  • *
  • Posts: 19
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #113 on: August 18, 2017, 09:07:00 AM »
Try set it to blacklevel 125.
thank you @Danne
with 125 as a value it seems to work, but image have some magenta cast, with 250 as value,The picture returns completely black.
I think I must find the sweet spot with black value.

Thanks again :)

EDIT:
without --black-fix parameter picture look good.. Perhaps fix black  was useless with this my mlv file. Sorry but I'm a novice :\

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #114 on: August 18, 2017, 10:17:07 AM »
New version:
batch_mlv
https://bitbucket.org/Dannephoto/batch_mlv/downloads/batch_mlv_in-out.zip

Tested with wav included and for some reason the for loop wants to reloop files over and over. I don´t really know what is going on but to simply break the loop after conversion I move the MLV files to a ORIGINALS folder. This wasn´t the case before when assigning a new output location ((O) from the menu). So now MLV files are moved to an ORIGINALS folder for all processing modes.



@GianlucaM83
Yes, black level should be left alone if nothing wrong with it.

mothaibaphoto

  • Senior
  • ****
  • Posts: 392
  • pesky kid
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #115 on: August 20, 2017, 06:15:43 PM »
I added --force-stripes to your script, Danne. For me it's mast have: my camera have strong stripes and black frames didn't help with that.
Code: [Select]
:: This program is free software; you can redistribute it and/or
:: modify it under the terms of the GNU General Public License
:: as published by the Free Software Foundation; either version 2
:: of the License, or (at your option) any later version.
:: This program is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
:: GNU General Public License for more details.
:: You should have received a copy of the GNU General Public License
:: along with this program; if not, write to the
:: Free Software Foundation, Inc.,
:: 51 Franklin Street, Fifth Floor,
:: Boston, MA  02110-1301, USA.

::Freely worked upon. First scripts here(Renatophoto)
::http://www.magiclantern.fm/forum/index.php?topic=10526.msg179631#msg179631

:: add any other additional mlv_dump setting by adding setting switches after --dng(e.g --dng -c for compressed dng output) Drag mlv_dump to cmd and hit enter to check parameters
:: HOWTO - Double click the batch_mlv file and see your MLV files process into folders with dng files. When done the original file will be moved to A_ORIGINALS folder
:: darkframe automation included. Put vanilla MLV darkframes into the darkframes folder and the regular MLV footage outside the darkframes folder and double click
:: the batch_mlv.cmd file. Darkframe MLV files will be averaged and renamed with matching info and the prefix avg_. If regular MLV footage and darkframe footage match
:: darkframe subtraction will take place, otherwise footage will be processed a usual. You can at any time erase or fill the darkframes folder with additional vanilla MLV files
:: to add to your darkframe storage. If no darkframes exists in the folder or if darkframes folder is erased batch_mlv will process with mlv_dump as usual.

::Thanks Bouncyball for mlv_dump(steroid version)
::Thanks to dfort for fpm pixel fixing lists in bin folder.



@Echo Off
::My selected input path
set /p path_in=<bin/mlv_dump_settings/path_in
set /p path_base=<bin/mlv_dump_settings/path_base
if exist bin/mlv_dump_settings/path_out set /p path_out=<bin/mlv_dump_settings/path_out
if exist bin/mlv_dump_settings/path_out if not exist "%path_out%" mkdir "%path_out%"

SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do     rem"') do (
  set "DEL=%%a"
)
ECHO OFF
CLS
mode con: cols=100 lines=50
:MENU

cd /d "%path_base%"/
::bin path
set PATH=%PATH%;%cd%/bin

ECHO.
ECHO                                         ..........
ECHO                                          MLV_DUMP
ECHO         ..........
ECHO.
if not exist "bin/mlv_dump_settings" mkdir "bin/mlv_dump_settings"
ECHO mlv_dump parameters. Reselect the same parameter to erase:

if exist bin/mlv_dump_settings/path_out set /p path_out=<bin/mlv_dump_settings/path_out
ECHO.
echo INPUT:  "%path_in%"
if exist bin/mlv_dump_settings/path_out (echo OUTPUT: "%path_out%" ) else ( echo OUTPUT:  "%path_in%")
ECHO.

if exist bin/mlv_dump_settings/CMPRS (call :colorEcho 0a "(1)  -c"
ECHO.)
if exist bin/mlv_dump_settings/DECMPRS (call :colorEcho 0a "(2)  -d"
ECHO.)
if exist bin/mlv_dump_settings/PASS (call :colorEcho 0a "(3)  -p"
ECHO.)
if exist bin/mlv_dump_settings/BDEPTH set /p bits=< bin/mlv_dump_settings/BDEPTH
if exist bin/mlv_dump_settings/BDEPTH (call :colorEcho 0a "(4)  %bits%"
ECHO.)
if exist bin/mlv_dump_settings/VS (call :colorEcho 0a "(5)  --no-stripes"
ECHO.)
if exist bin/mlv_dump_settings/cs2 (call :colorEcho 0a "(6)  --cs2x2"
ECHO.)
if exist bin/mlv_dump_settings/cs3 (call :colorEcho 0a "(7)  --cs3x3"
ECHO.)
if exist bin/mlv_dump_settings/cs5 (call :colorEcho 0a "(8)  --cs5x5"
ECHO.)
if exist bin/mlv_dump_settings/NOPIX (call :colorEcho 0a "(9)  --no-fixcp"
ECHO.)
if exist bin/mlv_dump_settings/FIXSPIX (call :colorEcho 0a "(10) --fixcp2"
ECHO.)
if exist bin/mlv_dump_settings/UNPACK (call :colorEcho 0a "(11) --no-bitpack"
ECHO.)
if exist bin/mlv_dump_settings/PATNOISE (call :colorEcho 0a "(12) --fixpn"
ECHO.)
if exist bin/mlv_dump_settings/EXPCOMP set /p expcomp=< bin/mlv_dump_settings/EXPCOMP
if exist bin/mlv_dump_settings/EXPCOMP (call :colorEcho 0a "(13) %expcomp%"
ECHO.)
if exist bin/mlv_dump_settings/NOAUDIO (call :colorEcho 0a "(14) --no-audio"
ECHO.)
if exist bin/mlv_dump_settings/BLACK set /p black=< bin/mlv_dump_settings/BLACK
if exist bin/mlv_dump_settings/BLACK (call :colorEcho 0a "(15) %black%"
ECHO.)
if exist bin/mlv_dump_settings/WHITE set /p white=< bin/mlv_dump_settings/WHITE
if exist bin/mlv_dump_settings/WHITE (call :colorEcho 0a "(16) %white%"
ECHO.)
if exist bin/mlv_dump_settings/VS_F (call :colorEcho 0a "(17)  --force-stripes"
ECHO.)


ECHO 1  - compress video and audio frames using LJ92.
ECHO 2  - decompress compressed video and audio frames using LZMA or LJ92
ECHO 3  - pass through original raw data without processing, it works for lossless or uncompressed raw
ECHO 4  - convert image data to given bit depth per channel (1-16)
ECHO 5  - disable vertical stripes fixing
ECHO 6  - Chroma smooth 2x2
ECHO 7  - Chroma smooth 3x3
ECHO 8  - Chroma smooth 5x5
ECHO 9  - do not fix cold pixels
ECHO 10 - fix non-static moving cold pixels slow
Echo 11 - write DNG files with unpacked to 16 bit raw data
Echo 12 - fix pattern noise
ECHO 13 - per-frame exposure compensation. value is target median in raw units ex: 3072 (default)
ECHO 14 - DNG output WAV not saved, MLV output WAVI/AUDF blocks are not included
ECHO 15 - set black level to value
ECHO 16 - set white level to value
ECHO 17 - compute stripe correction for every frame
call :colorEcho 0c "O  - Select OUTPUT folder"
ECHO.
call :colorEcho 0c "E  - Erase all parameters"
ECHO.
call :colorEcho 0c "Q  - Quit"
ECHO.
call :colorEcho 0b "R  - run batch_mlv"
ECHO.
ECHO.
SET /P M=Select mlv_dump parameter and press ENTER: 
IF %M%==1 GOTO COMPRSS
IF %M%==2 GOTO DECMPRS
IF %M%==3 GOTO PASS
IF %M%==4 GOTO BDEPTH
IF %M%==5 GOTO VertS
IF %M%==6 GOTO CS2x2
IF %M%==7 GOTO CS3x3
IF %M%==8 GOTO CS5x5
IF %M%==9 GOTO NOCPIX
IF %M%==10 GOTO FIXSPIX
IF %M%==11 GOTO UNPACK
IF %M%==12 GOTO PATNOISE
IF %M%==13 GOTO EXPCOMP
IF %M%==14 GOTO NOAUDIO
IF %M%==15 GOTO BLACK
IF %M%==16 GOTO WHITE
IF %M%==17 GOTO VertS_F
IF %M%==O GOTO OUTPUT
IF %M%==o GOTO OUTPUT
IF %M%==E GOTO RESET
IF %M%==Q GOTO EOF
IF %M%==q GOTO EOF
IF %M%==R GOTO batch_mlv
IF %M%==r GOTO batch_mlv
:COMPRSS
if exist bin/mlv_dump_settings/CMPRS (
cd bin/mlv_dump_settings
del CMPRS
cd..
cd..
) else (
@echo -c> bin/mlv_dump_settings/CMPRS
)
cls
GOTO MENU
:DECMPRS
if exist bin/mlv_dump_settings/DECMPRS (
cd bin/mlv_dump_settings
del DECMPRS
cd..
cd..
) else (
@echo -d> bin/mlv_dump_settings/DECMPRS
)
cls
GOTO MENU
:PASS
if exist bin/mlv_dump_settings/PASS (
cd bin/mlv_dump_settings
del PASS
cd..
cd..
) else (
@echo -p> bin/mlv_dump_settings/PASS
)
cls
GOTO MENU
:BDEPTH
if exist bin/mlv_dump_settings/BDEPTH (
cd bin/mlv_dump_settings
del BDEPTH
cd..
cd..
cls
GOTO MENU)
cls
call :colorEcho 0a "specify bitdepth below(1-16)"
ECHO.
set /p bits=""
echo -b %bits% > bin/mlv_dump_settings/BDEPTH
cls
GOTO MENU
:VertS
if exist bin/mlv_dump_settings/VS (
cd bin/mlv_dump_settings
del VS
cd..
cd..
) else (
@echo --no-stripes> bin/mlv_dump_settings/VS
)
cls
GOTO MENU
:VertS_F
if exist bin/mlv_dump_settings/VS_F (
cd bin/mlv_dump_settings
del VS_F
cd..
cd..
) else (
@echo --force-stripes> bin/mlv_dump_settings/VS_F
)
cls
GOTO MENU
:CS2x2
if exist bin/mlv_dump_settings/cs2 (
cd bin/mlv_dump_settings
del cs2
cd..
cd..
) else (
@echo --cs2x2> bin/mlv_dump_settings/cs2
cd bin/mlv_dump_settings
del cs3
del cs5
cd..
cd..
)
cls
GOTO MENU
:CS3x3
if exist bin/mlv_dump_settings/cs3 (
cd bin/mlv_dump_settings
del cs3
cd..
cd..
) else (
@echo --cs3x3> bin/mlv_dump_settings/cs3
cd bin/mlv_dump_settings
del cs2
del cs5
cd..
cd..
)
cls
GOTO MENU
:CS5x5
if exist bin/mlv_dump_settings/cs5 (
cd bin/mlv_dump_settings
del cs5
cd..
cd..
) else (
@echo --cs5x5> bin/mlv_dump_settings/cs5
cd bin/mlv_dump_settings
del cs2
del cs3
cd..
cd..
)
cls
GOTO MENU
:NOCPIX
if exist bin/mlv_dump_settings/NOPIX (
cd bin/mlv_dump_settings
del NOPIX
cd..
cd..
) else (
@echo --no-fixcp> bin/mlv_dump_settings/NOPIX
cd bin/mlv_dump_settings
del FIXSPIX
cd..
cd..
)
cls
GOTO MENU
:FIXSPIX
if exist bin/mlv_dump_settings/FIXSPIX (
cd bin/mlv_dump_settings
del FIXSPIX
cd..
cd..
) else (
@echo --fixcp2> bin/mlv_dump_settings/FIXSPIX
cd bin/mlv_dump_settings
del NOPIX
cd..
cd..
)
cls
GOTO MENU
:UNPACK
if exist bin/mlv_dump_settings/UNPACK (
cd bin/mlv_dump_settings
del UNPACK
cd..
cd..
) else (
@echo --no-bitpack> bin/mlv_dump_settings/UNPACK
)
cls
GOTO MENU
:PATNOISE
if exist bin/mlv_dump_settings/PATNOISE (
cd bin/mlv_dump_settings
del PATNOISE
cd..
cd..
) else (
@echo --fixpn> bin/mlv_dump_settings/PATNOISE
)
cls
GOTO MENU
:EXPCOMP
if exist bin/mlv_dump_settings/EXPCOMP (
cd bin/mlv_dump_settings
del EXPCOMP
cd..
cd..
cls
GOTO MENU)
cls
call :colorEcho 0a "specify deflicker value below(3072 default)"
ECHO.
set /p expcomp=""
echo --deflicker=%expcomp% > bin/mlv_dump_settings/EXPCOMP
cls
GOTO MENU
:NOAUDIO
if exist bin/mlv_dump_settings/NOAUDIO (
cd bin/mlv_dump_settings
del NOAUDIO
cd..
cd..
) else (
@echo --no-audio> bin/mlv_dump_settings/NOAUDIO
)
cls
GOTO MENU
:BLACK
if exist bin/mlv_dump_settings/BLACK (
cd bin/mlv_dump_settings
del BLACK
cd..
cd..
cls
GOTO MENU)
cls
call :colorEcho 0a "specify black level below(e.g 2048)"
ECHO.
set /p black=""
echo --black-fix=%black% > bin/mlv_dump_settings/BLACK
cls
GOTO MENU
:WHITE
if exist bin/mlv_dump_settings/WHITE (
cd bin/mlv_dump_settings
del WHITE
cd..
cd..
cls
GOTO MENU)
cls
call :colorEcho 0a "specify white level below(e.g 15000)"
ECHO.
set /p white=""
echo --white-fix=%white% > bin/mlv_dump_settings/WHITE
cls
GOTO MENU
:OUTPUT
if exist bin/mlv_dump_settings/path_out (
cd bin/mlv_dump_settings
del path_out
cd..
cd..
cls
GOTO MENU)
batch_mlv_OUT.bat
:RESET
cd bin/mlv_dump_settings
del PASS
del BDEPTH
del DECMPRS
del cs2
del cs3
del cs5
del NOPIX
del FIXSPIX
del UNPACK
del PATNOISE
del EXPCOMP
del VS
del CMPRS
del NOAUDIO
del BLACK
del WHITE
del VS_F
cd..
cd..
cls
GOTO MENU
:batch_mlv
@echo off

::mlv_dump parameters
(for /f "delims== tokens=1" %%G in (bin/mlv_dump_settings/CMPRS) do set cmprs=%%G) 2>nul
(for /f "delims== tokens=1" %%H in (bin/mlv_dump_settings/VS) do set VS=%%H) 2>nul
(for /f "delims== tokens=1" %%W in (bin/mlv_dump_settings/VS_F) do set VS_F=%%W) 2>nul
(for /f "delims== tokens=1" %%Z in (bin/mlv_dump_settings/cs2) do set cs2=%%Z) 2>nul
(for /f "delims== tokens=1" %%J in (bin/mlv_dump_settings/cs3) do set cs3=%%J) 2>nul
(for /f "delims== tokens=1" %%K in (bin/mlv_dump_settings/cs5) do set cs5=%%K) 2>nul
(for /f "delims== tokens=1" %%L in (bin/mlv_dump_settings/NOPIX) do set NOPIX=%%L) 2>nul
(for /f "delims== tokens=1" %%M in (bin/mlv_dump_settings/FIXSPIX) do set FIXSPIX=%%M) 2>nul
(for /f "delims== tokens=3" %%N in (bin/mlv_dump_settings/BLACK) do set BLACK=%%N) 2>nul
(for /f "delims== tokens=3" %%Q in (bin/mlv_dump_settings/WHITE) do set WHITE=%%Q) 2>nul
(for /f "delims== tokens=1" %%R in (bin/mlv_dump_settings/DECMPRS) do set decmprs=%%R) 2>nul
(for /f "delims== tokens=1" %%S in (bin/mlv_dump_settings/PASS) do set pass=%%S) 2>nul
(for /f "delims== tokens=1" %%T in (bin/mlv_dump_settings/BDEPTH) do set bdepth=%%T) 2>nul
(for /f "delims== tokens=1" %%U in (bin/mlv_dump_settings/UNPACK) do set unpack=%%U) 2>nul
(for /f "delims== tokens=1" %%V in (bin/mlv_dump_settings/PATNOISE) do set patnoise=%%V) 2>nul
(for /f "delims== tokens=1" %%Y in (bin/mlv_dump_settings/EXPCOMP) do set expcomp=%%Y) 2>nul
(for /f "delims== tokens=1" %%E in (bin/mlv_dump_settings/NOAUDIO) do set noaudio=%%E) 2>nul

if exist darkframes (
cd darkframes
if not exist "darkf_ORIG" mkdir darkf_ORIG
::Will create averaged darkframes in created folder and move the originals into darkf_ORIG folder
for %%a in ( *.MLV ) do (
(Echo "%%a" | find /I "avg_" 1>NUL) || (
for /f "tokens=2 delims=;= " %%I in ('mlv_dump.exe -v %%~na.MLV ^| find "ISO:"') do (   
for /f "tokens=2 delims=;= " %%B in ('mlv_dump.exe -v %%~na.MLV ^| find "bits_per_pixel"') do (
for /f "tokens=3 delims=;= " %%C in ('mlv_dump.exe -v %%~na.MLV ^| find "FPS   "') do (
for /f "tokens=2 delims=;= " %%R in ('mlv_dump.exe -v %%~na.MLV ^| find "Res:"') do (
for /f "tokens=5 delims='= " %%N in ('mlv_dump.exe -v %%~na.MLV ^| find "Camera "') do (
mlv_dump.exe -o "darkf_ORIG/avg_%%Bbit_%%N_%%C_%%Rres_%%Iiso.MLV" -a %%~na.MLV
if not exist "darkf_ORIG/%%~na.MLV" move %%~na.MLV darkf_ORIG
) ) ) ) )
cd darkf_ORIG
del avg_*.wav
move avg_*.MLV ..\
cd..
) )
cd..
@echo off
::if matched with darkframes in darkframe folder
cd /d "%path_in%"
for %%a in ( *.MLV ) do (
for /f "tokens=2 delims=;= " %%I in ('mlv_dump.exe -v %%~na.MLV ^| find "ISO:"') do (   
for /f "tokens=2 delims=;= " %%B in ('mlv_dump.exe -v %%~na.MLV ^| find "bits_per_pixel"') do (
for /f "tokens=3 delims=;= " %%C in ('mlv_dump.exe -v %%~na.MLV ^| find "FPS   "') do (
for /f "tokens=2 delims=;= " %%R in ('mlv_dump.exe -v %%~na.MLV ^| find "Res:"') do (
for /f "tokens=5 delims='= " %%N in ('mlv_dump.exe -v %%~na.MLV ^| find "Camera "') do (
for /f "tokens=2 delims=;= " %%P in ('mlv_dump.exe -v %%~na.MLV ^| find "Date"') do (
if exist "%path_base%"/bin/mlv_dump_settings/path_out (
md "%path_out%/%%~na_1_%%P_0001_C0000" 2>nul )&(
if exist "%path_base%/darkframes/avg_%%Bbit_%%N_%%C_%%Rres_%%Iiso.MLV" (
cd /d "%path_base%"/bin 
mlv_dump.exe -o "%path_out%/%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_" --dng --relaxed %cmprs% %VS% %VS_F% %cs2% %cs3% %cs5% %NOPIX% %FIXSPIX% %BLACK% %WHITE% %decmprs% %bdepth% %pass% %unpack% %patnoise% %expcomp% %noaudio% "%path_in%/%%~na.MLV" -s "%path_base%/darkframes/avg_%%Bbit_%%N_%%C_%%Rres_%%Iiso.MLV"
cd /d "%path_in%"
if not exist "ORIGINALS" mkdir ORIGINALS
if not exist "ORIGINALS/%%~na.MLV" move %%~na.MLV ORIGINALS
if not exist "ORIGINALS/%%~na.M*" move %path_in%/%%~na.M* ORIGINALS
) else (
cd /d "%path_base%"/bin
mlv_dump.exe -o "%path_out%/%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_" --dng --relaxed %cmprs% %VS% %VS_F% %cs2% %cs3% %cs5% %NOPIX% %FIXSPIX% %BLACK% %WHITE% %decmprs% %bdepth% %pass% %unpack% %patnoise% %expcomp% %noaudio% "%path_in%/%%~na.MLV"
if exist "%path_out%"/"%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_.wav" rename "%path_out%"/"%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_.wav" "%%~na_1_%%P_0001_C0000.wav"
cd /d %path_in%
if not exist "ORIGINALS" mkdir ORIGINALS
if not exist "ORIGINALS/%%~na.MLV" move %%~na.MLV ORIGINALS
if not exist "ORIGINALS/%%~na.M*" move %path_in%/%%~na.M* ORIGINALS
)
) else (
md "%%~na_1_%%P_0001_C0000" 2>nul )&(
if exist "%path_base%/darkframes/avg_%%Bbit_%%N_%%C_%%Rres_%%Iiso.MLV" (
cd /d "%path_base%"/bin 
mlv_dump.exe -o "%path_in%/%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_" --dng --relaxed %cmprs% %VS% %VS_F% %cs2% %cs3% %cs5% %NOPIX% %FIXSPIX% %BLACK% %WHITE% %decmprs% %bdepth% %pass% %unpack% %patnoise% %expcomp% %noaudio% "%path_in%/%%~na.MLV" -s "%path_base%/darkframes/avg_%%Bbit_%%N_%%C_%%Rres_%%Iiso.MLV"
) else (
cd /d "%path_base%"/bin
mlv_dump.exe -o "%path_in%/%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_" --dng --relaxed %cmprs% %VS% %VS_F% %cs2% %cs3% %cs5% %NOPIX% %FIXSPIX% %BLACK% %WHITE% %decmprs% %bdepth% %pass% %unpack% %patnoise% %expcomp% %noaudio% "%path_in%/%%~na.MLV" ) )&(
if exist "%path_in%"/"%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_.wav" rename "%path_in%"/"%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_.wav" "%%~na_1_%%P_0001_C0000.wav" )&(
cd /d "%path_in%"
if not exist "ORIGINALS" mkdir ORIGINALS
if not exist "ORIGINALS/%%~na.MLV" move %%~na.MLV ORIGINALS )&(
if not exist "ORIGINALS/%%~na.M*" move %%~na.M* ORIGINALS ) )
) ) ) ) ) )
) else (
::regular processing no darkframes
@echo off
cd /d "%path_in%"/
for %%a in ( *.MLV ) do (
for /f "tokens=2 delims=;= " %%P in ('mlv_dump.exe -v %%~na.MLV ^| find "Date"') do (
md "%path_out%/%%~na_1_%%P_0001_C0000" 2>nul )&(
cd /d "%path_base%"/bin
if exist mlv_dump_settings/path_out (
mlv_dump.exe -o "%path_out%/%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_" --dng --relaxed %cmprs% %VS% %VS_F% %cs2% %cs3% %cs5% %NOPIX% %FIXSPIX% %BLACK% %WHITE% %decmprs% %bdepth% %pass% %unpack% %patnoise% %expcomp% %noaudio% "%path_in%/%%~na.MLV" 
if exist "%path_out%"/"%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_.wav" rename "%path_out%"/"%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_.wav" "%%~na_1_%%P_0001_C0000.wav"
cd /d %path_in%/
if not exist "ORIGINALS" mkdir ORIGINALS
if not exist "ORIGINALS/%%~na.MLV" move %%~na.MLV ORIGINALS
if not exist "ORIGINALS/%%~na.M*" move %path_in%/%%~na.M* ORIGINALS
) else (
md "%path_in%/%%~na_1_%%P_0001_C0000"
mlv_dump.exe -o "%path_in%/%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_" --dng --relaxed %cmprs% %VS% %VS_F% %cs2% %cs3% %cs5% %NOPIX% %FIXSPIX% %BLACK% %WHITE% %decmprs% %bdepth% %pass% %unpack% %patnoise% %expcomp% %noaudio% "%path_in%/%%~na.MLV" )&(
if exist %path_in%/"%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_.wav" rename %path_in%/"%%~na_1_%%P_0001_C0000\%%~na_1_%%P_0001_C0000_.wav" "%%~na_1_%%P_0001_C0000.wav" )&(
cd /d %path_in%/
if not exist "ORIGINALS" mkdir ORIGINALS
if not exist "ORIGINALS/%%~na.MLV" move %%~na.MLV ORIGINALS )&(
if not exist "ORIGINALS/%%~na.M*" move %path_in%/%%~na.M* ORIGINALS ) )
) )
cls
GOTO MENU

:colorEcho
echo off
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1i



:: Copyright (C) 2017 Danne

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #116 on: August 20, 2017, 06:25:14 PM »
Great. I add it and put up a new version. Didn´t think anybody was using it but there you go :).

Did you put it in all the way? Can´t see it in mlv_dump alternatives at the bottom. Will check deeper and fix stuff if needed.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487

mothaibaphoto

  • Senior
  • ****
  • Posts: 392
  • pesky kid
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #118 on: August 21, 2017, 08:47:41 AM »
I used this script because of experimenting with black frames and you implemented automatic selection of appropriate BF. But need to say that all that shell scripting is real pain. It need a dozen edits to just add one parameter. And all that "Goto" hell to understand. And for you to rearrange that parameter to proper position it takes no less hassle.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #119 on: August 21, 2017, 09:28:35 AM »
Be my guest and do something more simple and user friendly. I follow the syntax of cmd.exe. And it works, so I can't really see the problem here.

Kharak

  • Hero Member
  • *****
  • Posts: 943
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #120 on: September 04, 2017, 05:23:01 PM »
I have some Vanilla MLV's that I want to reconvert with DF Averaging. Do I have to record the DF MLV's in Uncompressed 14 bit? Or will Lossless 14 bit DF MLV work with Uncompressed?
once you go raw you never go back

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #121 on: September 04, 2017, 05:34:38 PM »
I have no idea. Doesn´t hurt to test :)

Kharak

  • Hero Member
  • *****
  • Posts: 943
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #122 on: September 04, 2017, 06:03:03 PM »
Hoped you knew so I didn't have to ;)

But I am also asking because I could imagine that the script will accept both Lossless and Uncompressed, but I am wondering if a Lossless DF-MLV will be as effective to an Uncompressed MLV as an Uncompressed DF would be?

Would be easier if I could play the MLV in MLVrawviewer and compare to the DNG output. So I have to run three times, one without DF, one with Lossless DF and one with Uncom DF. I suppose it is the best method to find out?

once you go raw you never go back

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6487
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #123 on: September 04, 2017, 07:50:38 PM »
I differ 10/12/14bit but didn´t really check into lossless against non compressed in combination. If needed I could probably differ that out as well. It should be easy to check if it works or not. I imagine corruption in image if not working. Just guessing  :P

Kharak

  • Hero Member
  • *****
  • Posts: 943
Re: [WINDOWS] simple right clic menu mlv dump batch
« Reply #124 on: October 29, 2017, 06:38:44 PM »
Just found out that I can leave all the different Resolutions of Darkframes e.g. 1330p, 1080p, 950p, 818p etc in the Darkframe folder.. For some reason I thought I had to only keep the suitable resolutions in the darkframe folder. So I have been moving and removing Darkframes from the Darkframe folder depending on the resolutions I shot in.

So for anyone else's information: just fill the folder up with all the Darkframe resolutions you will usually shoot with or all resolutions, if you have time.

@Danne,

I still love this "app" ;)
once you go raw you never go back