Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal enabledelayedexpansion
- :: path to current directory is %~dp0
- SET mypath=%~dp0
- SET VirtualDubPath=D:\Programme\VirtualDub\
- SET VirtualDub="%VirtualDubPath%VirtualDub.exe"
- :: Create the encode.bat file
- echo @echo off > encode.bat
- :: Clear the job list
- echo %VirtualDub% /c /min /x >> encode.bat
- :: Make two rounds to insert the encoding call in the bottom of the encode.bat file
- FOR %%a IN (*.mp4) do call :make_1 "%%a" "%%~na"
- FOR %%a IN (*.mp4) do call :make_2 "%%a" "%%~na"
- goto :end
- :: **
- :: The make function
- :: **
- :make_1
- SET file=%mypath%%~1
- SET deshakerLogRaw=%mypath%Deshaker.%~2.log
- SET REPLACE=\\
- SET deshakerLog=%deshakerLogRaw:\=!REPLACE!%
- :: Create the first AVS file
- echo LoadVirtualDubPlugin ("%VirtualDubPath%plugins32\Deshaker.vdf", "deshaker", preroll=0) > %2_1.avs
- echo FFMpegSource2("%file%", -1, -1) >> %2_1.avs
- echo ConverttoRGB32() >> %2_1.avs
- echo Deshaker("19|1|30|4|1|0|1|0|640|480|1|2|100|250|0|0|4|0|1|2|8|30|300|4|%deshakerLog%|0|1|360|360|0|0|0|0|0|0|0|0|0|1|7|15|0.1|0.1|1|1|1|1|0|0|1|0|1|1|1|5|1000|1|95|1|1|20|5000|100|20|1|0|ff00ff") >> %2_1.avs
- :: Insert into the encode.bat file
- echo %VirtualDub% /s "I:\GoPro\Lagarith.RGB.vdscript" /p "%mypath%%~2_1.avs","%mypath%%~2%.Deshaker.avi" /min /x >> encode.bat
- goto :eof
- :: **
- :: The second make function to insert the actual encoding to the bottom of the encode batch file
- :: **
- :make_2
- SET file=%mypath%%~1
- SET deshakerLogRaw=%mypath%Deshaker.%~2.log
- SET REPLACE=\\
- SET deshakerLog=%deshakerLogRaw:\=!REPLACE!%
- :: Create the second AVS file
- echo LoadVirtualDubPlugin ("%VirtualDubPath%\plugins32\Deshaker.vdf", "deshaker", preroll=0) > %2_2.avs
- echo LoadPlugin("D:\Programme\VideoEditing\AviSynth\plugins\SimpleResize.dll") >> %2_2.avs
- echo FFMpegSource2("%file%", -1, -1) >> %2_2.avs
- echo ConverttoRGB32() >> %2_2.avs
- echo Deshaker("19|2|30|4|1|0|1|0|640|480|1|2|100|250|0|0|4|0|1|2|8|30|300|4|%deshakerLog%|0|1|360|360|0|0|0|0|0|0|0|0|0|1|7|15|0.1|0.1|1|1|1|1|0|0|1|0|1|1|1|5|1000|1|95|1|1|20|5000|100|20|1|0|ff00ff") >> %2_2.avs
- echo ConvertToYV12 >> %2_2.avs
- echo ConvertToYUY2 >> %2_2.avs
- echo WarpedResize(2560, 1440, 0.75, 1) # (width, height, hWarp, vWarp) >> %2_2.avs
- echo ConvertToYV12 >> %2_2.avs
- :: Insert into the encode.bat file
- echo %VirtualDub% /s "I:\GoPro\Lagarith.RGB.vdscript" /p "%mypath%%~2_2.avs","%mypath%%~2%.Deshaker.16-9.avi" /min /x >> encode.bat
- goto :eof
- :: **
- :: The ending function
- :: **
- :end
- :: Run the job list
- echo %VirtualDub% /r >> encode.bat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement