[Android Themes] makers_mark:
Click the button below for v1.86b Batch Script 1 of 2

The second half is in the next post.

@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
SET /A cols=57
SET /A lines=73
MODE CON:COLS=%cols% LINES=%lines%
COLOR 0B
SET "autoopen=remark_this_value_to_stop_automatically_opening_videos"
::SET "autoopenfolder=remark_this_value_to_stop_automatically_opening_folders"
::SET "autoopengif=remark_this_value_to_stop_automatically_opening_gifs"
SET "vers=1.86b"
SET "dirsort=/o-d"
SET "sort=/on"
::set sort equal to /od if images have no number padding like image1.jpg instead of image0001.jpg
TITLE Boot Animation to Mp4 v%vers%
SET "logall=>>"%~dp0log.txt" 2>>&1"
SET "logerr=1>NUL 2>>errorlog.txt"
SET "gifpixelformat=-pix_fmt rgb8"
SET "fformat=yuv420p"
SET /A defaultfolderrepeats=1
SET /A "defaultbitrate=6100"
SET /A "bitrate=%defaultbitrate%"
SET "renumprepend=_"
SET /A "defaultjpegquality=7"
SET /A "jpegquality=%defaultjpegquality%"
SET "motovidname=qooqle"
SET "bootanimationfilename=bootanimation.zip"
SET "zipfolder=Zips"
SET "madezipfolder=Made_Zips"
SET "gifsfolder=Gifs"
SET "outputtogif="
SET "androidfolder=/data/local/"
SET "savefolder=Videos"
SET "savename=bootanimation"
SET "quality=-crf 23"
SET "videotype=mp4"
SET "ffdebug="
SET "ffshowb=-hide_banner"
SET /A aspectmultiplier=10000
SET "stno=-start_number 1"
SET "stnorng=-start_number_range 19"
SET "log=%logall%"
IF "%~1"=="-d" (
SET "debugmode=1"
SET "ffdebug=-loglevel debug"
SET "ffshowb=%"
MODE CON:COLS=140 LINES=4000
COLOR 07
)
IF EXIST "%~dp0errorlog.txt" DEL /Q "%~dp0errorlog.txt"
IF EXIST "%~dp0log.txt" DEL /Q "%~dp0log.txt"
IF EXIST "%~dp0fztemp" RMDIR /Q "%~dp0fztemp"
IF NOT EXIST "%~dp0%madezipfolder%" MKDIR "%~dp0%madezipfolder%"
IF NOT EXIST "%~dp0%zipfolder%" MKDIR "%~dp0%zipfolder%"
IF NOT EXIST "%~dp0%savefolder%" MKDIR "%~dp0%savefolder%"
IF EXIST "%~dp0copylist" DEL "%~dp0copylist" /q

:MAINMENUBA2MP4
CALL :DRAWHEADBA2MP4
ECHO.
ECHO.Use options 2 or 3 to convert from Mp4 style boot
ECHO.animation to jpg style, or vice versa. Or make a video.
ECHO.
ECHO.Use Quickport, options 4 or 5, to change resolution and
ECHO.output a "same type" bootanimation.
ECHO.
ECHO._________________________________________________________
ECHO.
ECHO.
ECHO. 1 - Use ADB To Pull Your Boot Animation.
ECHO.
ECHO. 2 - Convert Zips In "%zipfolder%"
ECHO.
ECHO. 3 - Convert Zips In "%madezipfolder%"
ECHO.
ECHO. 4 - Quickport Zips In "%zipfolder%"
ECHO.
ECHO. 5 - Quickport Zips In "%madezipfolder%"
ECHO.
ECHO. 6 - Combine Videos In "%savefolder%" into one.
ECHO.
ECHO. 7 - Exit
ECHO.
ECHO.
IF EXIST "%~dp0temp" RMDIR "%~dp0temp" /s /q %log%
CALL :RESETVALUES
CHOICE /n /m "Please Select A Menu Number:" /c:1234567
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF ERRORLEVEL 3 SET K=3
IF ERRORLEVEL 4 SET K=4
IF ERRORLEVEL 5 SET K=5
IF ERRORLEVEL 6 SET K=6
IF ERRORLEVEL 7 SET K=7
IF %K%==1 GOTO :ADBTOGETIT
IF %K%==2 CALL :BAZIPSFOLDER %zipfolder%
IF %K%==3 CALL :BAZIPSFOLDER %madezipfolder%
IF %K%==4 SET qport=1&CALL :BAZIPSFOLDER %zipfolder%
IF %K%==5 SET qport=1&CALL :BAZIPSFOLDER %madezipfolder%
IF %K%==6 GOTO :CONCATALL
IF %K%==7 GOTO :FINISH
GOTO :MAINMENUBA2MP4

:ADBTOGETIT
CALL :GETBA
SET "filename=%savename%.zip"
CALL :UNZIP "%filename%"
CALL :DUPENAME "%zipfolder%" "savename" "zip"
MOVE "%~dp0%filename%" "%~dp0%zipfolder%\%savename%.zip" %log%
SET "filename=%savename%.zip"
CALL :READDESC
IF %filetype% EQU 1	GOTO :YOURSETTINGS
IF %filetype% EQU 2 GOTO :JPGSETTINGS
GOTO :MAINMENUBA2MP4

:BAZIPSFOLDER
>NUL 2>&1 (DIR /A-D-S-H/B "%~dp0%~1\*.zip"|FINDSTR "^")||GOTO :MAINMENUBA2MP4
SET "originatingfolder=%~1"
SET /a index=0
CALL :DRAWHEADBA2MP4
FOR /F "delims=" %%E IN ('dir /a-d-h/b%dirsort% "%~dp0%~1\*.zip"') DO (
SET /A index+=1
SET "zipfile[!index!]=%%E"
(("%~dp0\bin\7ZA" l "%~dp0%~1\%%E"|findstr /c:" desc.txt")&&(SET "ziptype[!index!]=REG")||("%~dp0\bin\7ZA" l "%~dp0%~1\%%E"|findstr /c:"videodesc.txt")&&(SET "ziptype[!index!]=MP4")||(SET "ziptype[!index!]=FLA")) %log%
)
ECHO.
ECHO.REG is a bootanimation with either pngs or jpgs
ECHO.MP4 is a bootanimation with Mp4 video files
ECHO.FLA is a flashable zip file with another zip inside it
ECHO.
ECHO.Zips in \%~1\
ECHO.
ECHO.No. Type Filename
ECHO._________________________________________________________
FOR /l %%I in (1,1,%index%) DO (IF %%I LSS 10 (ECHO. %%I. !ziptype[%%I]! !zipfile[%%I]!) ELSE (ECHO.%%I. !ziptype[%%I]! !zipfile[%%I]!))
ECHO.
ECHO.[Press enter to go back to the main menu]
ECHO._________________________________________________________
ECHO.
ECHO.Choose a number AND press enter...
ECHO.
:LOOPBACK
SET /p pickazip=: ||GOTO :MAINMENUBA2MP4
IF %pickazip% LSS 1 GOTO :LOOPBACK
IF %pickazip% GTR %index% GOTO :LOOPBACK
ECHO.
ECHO.Unzipping and reading files...
SET filename=!zipfile[%pickazip%]!
CALL :UNZIP "%~1\%filename%"
SET "savename=%filename:.zip=%"
CALL :READDESC "%~2"
IF DEFINED qport GOTO :QUICKPORT
IF %filetype% EQU 1	GOTO :YOURSETTINGS
IF %filetype% EQU 2 GOTO :JPGSETTINGS
GOTO :BAZIPSFOLDER

:QUICKPORT
IF %filetype% EQU 1 GOTO :QPREG
IF %filetype% EQU 2 GOTO :QPMP4
:QPREG
CALL :DRAWSETTINGS
ECHO.
ECHO. 1 - Change Resolution
ECHO.
ECHO. 2 - Port It!
ECHO.
ECHO. 3 - Go To The Main Menu
ECHO.
CHOICE /n /m "Please Select A Menu Number:" /c:123
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF ERRORLEVEL 3 SET K=3
IF %K%==1 CALL :CHANGERES&GOTO :QPREG
IF %K%==2 GOTO :PORT2REG
IF %K%==3 GOTO :MAINMENUBA2MP4
GOTO :QUICKPORT

:QPMP4
CALL :DRAWSETTINGS
ECHO.
ECHO. 1 - Change Resolution
ECHO.
ECHO. 2 - Change Bitrate ^(%bitrate%^)
ECHO.
ECHO. 3 - Port It!
ECHO.
ECHO 4 - Go To The Main Menu
ECHO.
CHOICE /n /m "Please Select A Menu Number:" /c:1234
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF ERRORLEVEL 3 SET K=3
IF ERRORLEVEL 4 SET K=4
IF %K%==1 CALL :CHANGEVRES&GOTO :QPMP4
IF %K%==2 CALL :GETBITRATE
IF %K%==3 GOTO :PORT2MP4
IF %K%==4 GOTO :MAINMENUBA2MP4
GOTO :QUICKPORT

:PORT2MP4
IF NOT DEFINED scale SET "scale=scale=%width%:%height%"
IF DEFINED crop SET "videofilters=-vf "%scale%,%crop%,format=%fformat%""
IF NOT DEFINED crop SET "videofilters=-vf "%scale%,format=%fformat%""
CALL :DRAWSETTINGS
IF DEFINED bitrate SET "savename=b%bitrate%_%savename%"&SET "bitratestring=-b:v %bitrate%k"
SET "savename=%width%x%height%_%savename%"
CALL :DUPENAME "%madezipfolder%" "savename" "zip"
%log% CALL :CLEARBUFF
ECHO.
SET /A checkheight=%height%%%2
SET /A checkwidth=%width%%%2
ECHO.
ECHO.
IF %checkheight% EQU 1 (SET /A height-=1 & ECHO.Height has been adjusted 1 pixel)
IF %checkwidth% EQU 1 (SET /A width-=1	& ECHO.Width has been adjusted 1 pixel)
ECHO.Working..
FOR /L %%A IN (1,1,%staticfoldercount$%) DO (
%log% "%~dp0\bin\FFMPEG" %ffdebug% %ffshowb% -i "%~dp0temp\!mp4file[%%A]!" %bitratestring% -bufsize %bitrate%k %videofilters% -y "%~dp0temp\buffer\!mp4file[%%A]!"||(CALL :FFVIEW&SET "savename=%filename:.zip=%"&GOTO :QPMP4)
ECHO.!mp4file[%%A]! complete
ECHO.!folderrepeats[%%A]! !pauselastframe[%%A]!>>"%~dp0temp\buffer\videodesc.txt"
)
IF %checkheight% EQU 1 SET /A height+=1
IF %checkwidth% EQU 1 SET /A width+=1
SET checkheight=
SET checkwidth=
%log% "%~dp0\bin\7ZA" a -y -r -tzip "%~dp0%madezipfolder%\%savename%.zip" "%~dp0temp\buffer\*.*" -mx0
ECHO.______________________________________________________-_-
ECHO.
ECHO.\\\\\\\\\\\\\\\\\\\\\\\\\\DONE///////////////////////////
ECHO.
ECHO.Zip saved in "%madezipfolder%"
ECHO.as "%savename%.zip"
ECHO.
ECHO.
ECHO.//////////////////////////DONE\\\\\\\\\\\\\\\\\\\\\\\\\\\
ECHO._________________________________________________________
IF DEFINED autoopenfolder START "" "%~dp0%madezipfolder%\"
ECHO.
ECHO.Would you like to:
ECHO.
ECHO. 1 - Go Back
ECHO.
ECHO. 2 - Go To The Main Menu
ECHO.
CHOICE /n /m "Please Select A Menu Number:" /C:12
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF %K%==1 (
SET "savename=%filename:.zip=%"
GOTO :QUICKPORT
)
IF %K%==2 (
RMDIR /Q "%~dp0temp"
GOTO :MAINMENUBA2MP4
)
GOTO :EOF

:PORT2REG
CALL :DRAWSETTINGS
IF NOT DEFINED scale SET "scale=scale=%width%:%height%"
IF DEFINED crop (SET "videofilters=-vf "%scale%,%crop%"") ELSE (SET "videofilters=-vf "%scale%"")
%log% CALL :CLEARBUFF
SET "savename=%width%x%height%_%savename%"
CALL :DUPENAME "%madezipfolder%" "savename" "zip"
ECHO.
ECHO.
ECHO.Working..
ECHO.%width% %height% %fpsout%>"%~dp0temp\buffer\desc.txt"
FOR /L %%A IN (1,1,%staticfoldercount$%) DO (
IF NOT EXIST "%~dp0temp\buffer\!folder[%%A]!" MKDIR "%~dp0temp\buffer\!folder[%%A]!"
CALL :RENUM "!folder[%%A]!" !extinfolder[%%A]! %log%
%log% "%~dp0\bin\FFMPEG" %ffdebug% %ffshowb% %stno% %stnorng% -f image2 -i "%~dp0temp\!folder[%%A]!\%renumprepend%%%05d.!extinfolder[%%A]!" -qscale 0 %videofilters% -y "%~dp0temp\buffer\!folder[%%A]!\%renumprepend%%%05d.!extinfolder[%%A]!"||(CALL :FFVIEW&SET "savename=%filename:.zip=%"&GOTO :QPREG)
"%~dp0\bin\7ZA" a -tzip "%~dp0%madezipfolder%\%savename%.zip" "%~dp0temp\buffer\!folder[%%A]!" -mx0 %log%
ECHO.!folder[%%A]! complete
ECHO.!foldertype[%%A]! !folderrepeats[%%A]! !pauselastframe[%%A]! !folder[%%A]!>>"%~dp0temp\buffer\desc.txt"
)
"%~dp0\bin\7ZA" a -tzip "%~dp0%madezipfolder%\%savename%.zip" "%~dp0temp\buffer\desc.txt" -mx0 %log%
"%~dp0\bin\7ZA" d "%~dp0%madezipfolder%\%savename%.zip" thumbs.db -r %log%
ECHO.______________________________________________________-_-
ECHO.
ECHO.\\\\\\\\\\\\\\\\\\\\\\\\\\DONE///////////////////////////
ECHO.
ECHO.Zip saved in "%madezipfolder%"
ECHO.as "%savename%.zip"
ECHO.
ECHO.
ECHO.//////////////////////////DONE\\\\\\\\\\\\\\\\\\\\\\\\\\\
ECHO._________________________________________________________
IF DEFINED autoopenfolder START "" "%~dp0%madezipfolder%\"
ECHO.
ECHO.Would you like to:
ECHO.
ECHO. 1 - Go Back
ECHO.
ECHO. 2 - Open Zip In The Mp4/Gif Converter
ECHO.
ECHO. 3 - Go to the Main Menu
ECHO.
CHOICE /n /m "Please Select A Menu Number:" /C:123
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF ERRORLEVEL 3 SET K=3
IF %K%==1 (
SET "savename=%filename:.zip=%"
GOTO :QUICKPORT
)
IF %K%==2 (
RMDIR /q "%~dp0temp" %log%
CALL :UNZIP "%madezipfolder%\!savename!.zip"
SET "filename=!savename!"
CALL :RESETVALUES
SET savename=!filename:.zip=!
SET qport=
SET /a filetype=1
CALL :READDESC
GOTO :YOURSETTINGS
)
IF %K%==3 (
RMDIR /Q "%~dp0temp"
GOTO :MAINMENUBA2MP4
)
GOTO :EOF

:CLEARBUFF
DEL /q "%~dp0temp\buffer\*.*"
RMDIR /q "%~dp0temp\buffer"
MKDIR "%~dp0temp\buffer"
GOTO :EOF

:RESETVALUES
SET bufsize=
SET testfile=
SET qport=
SET append=
SET "savename=bootanimation"
SET videofilters=
SET outputtogif=
SET gif=
SET strang=
SET width=
SET height=
SET fps=
SET fpsout=
SET filetype=
SET crop=
SET scale=
SET /A jpegquality=%defaultjpegquality%
SET /A "bitrate=%defaultbitrate%"
SET vidfps=
SET vidwidth=
SET vidheight=
GOTO :EOF

:FILLTHEVOID
CALL :DRAWSETTINGS
ECHO You need to input how many folder repeats you want for
ECHO.
ECHO the following folder(s):
ECHO.
ECHO.To get at least X seconds of video for a folder with '0'
ECHO.
ECHO.enter tx
ECHO.
ECHO.Example:
ECHO.
ECHO.You want the last folder to play at least 10 seconds.
ECHO.
ECHO.Enter 't10' or 'T 10'
ECHO.
ECHO._________________________________________________________
FOR /L %%P IN (1,1,%staticfoldercount$%) DO (
IF DEFINED gorighttovideo SET /A folderrepeats[%%P]=%defaultfolderrepeats%
IF !folderrepeats[%%P]! EQU 0 (
ECHO.
ECHO.FOLDER %%P: !folder[%%P]! needs a value to loop for the video.
ECHO.
SET /A secondsperloop[%%P]=!frames[%%P]!/%fps% >NUL 2>&1
SET /A secondsperlooprem[%%P]=!frames[%%P]!%%%fps% >NUL 2>&1
ECHO.One loop of this folder will last !secondsperloop[%%P]! !secondsperlooprem[%%P]!/%fps% seconds.
ECHO.
CALL :SETFOLDERSUB %%P
)
)
GOTO :EOF

:SETFOLDERSUB
:LOOP2
SET /P folderrepeats[%1]=How many loops: || SET /a folderrepeats[%1]=1
SET "tcheck=!folderrepeats[%1]:~0,1!
IF /i "%tcheck%"=="t" (
SET "secondswanted=!folderrepeats[%1]:~1,8!"
SET "secondswanted=!secondswanted: =!"
SET /A "folderrepeats[%1]=!secondswanted!/!secondsperloop[%1]!"
SET "tcheck="
IF "!folderrepeats[%1]!"=="0" SET "folderrepeats[%1]=1"
GOTO :EOF
)
2>NUL SET /A folderrepeats[%1]=!folderrepeats[%1]!/1
IF !folderrepeats[%1]! LSS 1 GOTO :LOOP2
GOTO :EOF

:eek:RIGINALRES
IF [%~2]==[V] SET givefps=1
FOR /F "tokens=1-8* delims=," %%A IN ('bin\FFMPEG -i "%~dp0temp\%~1" 2^>^&1^|FINDSTR /rxic:".*stream #0:0.*[0-9][0-9]x[0-9][0-9].*"') DO (
ECHO.%%A >"%~dp0temp\imageres"
ECHO.%%B >>"%~dp0temp\imageres"
ECHO.%%C >>"%~dp0temp\imageres"
ECHO.%%D >>"%~dp0temp\imageres"
ECHO.%%E >>"%~dp0temp\imageres"
ECHO.%%F >>"%~dp0temp\imageres"
ECHO.%%G >>"%~dp0temp\imageres"
ECHO.%%H >>"%~dp0temp\imageres"
)
IF DEFINED givefps FOR /F "tokens=1 delims= " %%d IN ('TYPE "%~dp0temp\imageres"^|FINDSTR /rxic:".*fps.*"') DO SET vidfps=%%d
IF DEFINED givefps FOR /F "tokens=1 delims= " %%d IN ('TYPE "%~dp0temp\imageres"^|FINDSTR /rxic:".*kb/s.*"') DO (SET "vidbitrate=%%d"&SET /A "vidbitrate=!vidbitrate: =!")
FOR /F "tokens=1-3 delims=x " %%d IN ('TYPE "%~dp0temp\imageres"^|FINDSTR /rxic:".*[0-9][0-9]x[0-9][0-9].*"') DO (SET "vidwidth=%%d"&SET /a "vidwidth=!vidwidth: =!"&SET "vidheight=%%e"&SET /a "vidheight=!vidheight: =!")
%log% TYPE "%~dp0temp\imageres"
DEL /Q "%~dp0temp\imageres"
SET givefps=
GOTO :EOF

:DRAWSETTINGS
CALL :DRAWHEADBA2MP4
ECHO.File:"%filename%"
ECHO.______________________________________________________-_-
IF %filetype% EQU 1 (
FOR /l %%z IN (1,1,%staticfoldercount$%) DO (
SET /A totalwithrepeats[%%z]=!frames[%%z]!*!folderrepeats[%%z]! >NUL 2>&1
SET /A stime[%%z]=!totalwithrepeats[%%z]!/%fps% >NUL 2>&1
SET /A dtime[%%z]=!totalwithrepeats[%%z]!%%%fps% >NUL 2>&1
IF %%z LSS 10 (
ECHO. %%z: !foldertype[%%z]!	!folderrepeats[%%z]!	!pauselastframe[%%z]!	!folder[%%z]!
) ELSE (
ECHO.%%z: !foldertype[%%z]!	!folderrepeats[%%z]!	!pauselastframe[%%z]!	!folder[%%z]!
)
)
)
IF %filetype% EQU 2 (
IF NOT DEFINED qport FOR /L %%b IN (1,1,%staticfoldercount$%) DO ECHO.%%b: !foldertype[%%b]!	!folderrepeats[%%b]!	!pauselastframe[%%b]!	!folder[%%b]!
ECHO._________________________________________________________
ECHO.
IF NOT DEFINED qport (FOR /l %%z IN (1,1,%staticfoldercount$%) DO ECHO.!folder[%%z]! will refer to !mp4file[%%z]!) ELSE (FOR /l %%z IN (1,1,%staticfoldercount$%) DO ECHO.!mp4file[%%z]!)
ECHO._________________________________________________________
ECHO.Source: %vidwidth%x%vidheight% @ %vidfps%fps @ %vidbitrate%kb/s
ECHO._________________________________________________________
IF NOT DEFINED qport (ECHO.Output: %width%x%height% @ %fps%fps @ jpg quality:%jpegquality%) ELSE (ECHO.Output: %width%x%height% @ %fps%fps @ %bitrate%kb/s)
ECHO._________________________________________________________
GOTO :EOF
)
ECHO._________________________________________________________
FOR /l %%M IN (1,1,%staticfoldercount$%) DO ECHO.!folder[%%M]!	Frames: !frames[%%M]! x !folderrepeats[%%M]!	Length: !stime[%%M]! !dtime[%%M]!/%fps% seconds
ECHO._________________________________________________________
SET /A grandtotal=0
FOR /L %%R IN (1,1,%staticfoldercount$%) DO SET /A grandtotal=!grandtotal!+!totalwithrepeats[%%R]!
ECHO.Total frames:	%grandtotal%
SET /A totaltime=%grandtotal% / %fps%
SET /A fractiontime=%grandtotal%%%%fps
ECHO.Total time:	%totaltime% %fractiontime%/%fps% seconds
ECHO._________________________________________________________
ECHO.Source Resolution: %vidwidth%x%vidheight% @ %fps%fps
ECHO._________________________________________________________
ECHO.Output Resolution: %width%x%height% @ %fpsout%fps
ECHO._________________________________________________________
IF NOT DEFINED qport (
ECHO.FFmpeg quality is set at %quality% on a scale of 0 to 51
ECHO._________________________________________________________
)
GOTO :EOF

:JPGSETTINGS
CALL :DRAWSETTINGS
ECHO.
ECHO.Please choose one of the following...
ECHO.
ECHO.
ECHO. 1 - Export To A Jpg Bootanimation.zip
ECHO.
ECHO. 2 - Export To A Jpg Bootanimation And Make Mp4
ECHO.
ECHO. 3 - Change The Jpg Quality Level ^(%jpegquality%^)
ECHO.
ECHO. 4 - Change The Resolution ^(%width%x%height%^)
ECHO.
ECHO. 5 - Go To The Main Menu
ECHO.
ECHO. 6 - Exit
ECHO.
ECHO.
CHOICE /n /m "Please Select A Menu Number:" /C:123456
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF ERRORLEVEL 3 SET K=3
IF ERRORLEVEL 4 SET K=4
IF ERRORLEVEL 5 SET K=5
IF ERRORLEVEL 6 SET K=6
IF %K%==1 CALL :AREYOUSURE&&GOTO :MAKEJPGBA||GOTO :JPGSETTINGS
IF %K%==2 CALL :AREYOUSURE&&(SET "gorighttovideo=1"&SET "returnfilename=%filename%"&GOTO :MAKEJPGBA)||GOTO :JPGSETTINGS
IF %K%==3 CALL :CHANGEJPG
IF %K%==4 CALL :CHANGEVRES
IF %K%==5 GOTO :MAINMENUBA2MP4
IF %K%==6 GOTO :FINISH
GOTO :JPGSETTINGS

:CHANGEJPG
CALL :DRAWSETTINGS
ECHO.
ECHO.The lower the number the better the quality, and the
ECHO.
ECHO.bigger the filesize. The best is 1 while the worst
ECHO.
ECHO.quality is 31.
ECHO.
ECHO.[press enter to use the default: %defaultjpegquality%]
ECHO._________________________________________________________
ECHO.
:LOOP4
SET /P jpegquality=Enter the jpeg quality: || SET /A jpegquality=%defaultjpegquality%
2>NUL SET /A jpegquality=%jpegquality%/1 || GOTO :LOOP4
IF %jpegquality% LSS 1 GOTO :LOOP4
IF %jpegquality% GTR 31 GOTO :LOOP4
GOTO :EOF

:CHANGERES
SET crop=
SET scale=
CALL :DRAWSETTINGS
ECHO.
ECHO.Enter your width and height desired. Current:%width%x%height%
ECHO.
ECHO.[press enter to use source image size:%vidwidth%x%vidheight%]
ECHO._________________________________________________________
ECHO.
:LOOP12
SET /P width=Enter the width: || SET /A width=%vidwidth% || GOTO :LOOP12
2>NUL SET /A width=%width%/1 || GOTO :LOOP12
IF %width% LSS 2 GOTO :LOOP12
ECHO.
:LOOP13
SET /P height=Enter the height: || SET /A height=%vidheight% || GOTO :LOOP13
2>NUL SET /A height=%height%/1 || GOTO :LOOP13
IF %height% LSS 2 GOTO :LOOP13
ECHO.
SET "scale=scale=%width%:%height%"
SET /A "newaspect=%aspectmultiplier%*%height%/%width%"
SET /A "originalaspect=%aspectmultiplier%*%vidheight%/%vidwidth%"
IF "!newaspect!" NEQ "!originalaspect!" CALL :ASPECTCHANGE
SET newaspect=
SET originalaspect=
GOTO :EOF

:CHANGEVRES
SET crop=
SET scale=
CALL :DRAWSETTINGS
ECHO.
ECHO.
ECHO.
ECHO.
ECHO._________________________________________________________
ECHO.
IF NOT DEFINED qport (
ECHO.Enter your width and height desired. These values will
ECHO.
ECHO.be written to the desc.txt file in the zip that is
ECHO.
ECHO.produced.
ECHO.
) ELSE (
ECHO.Enter your width and height desired.
ECHO.
)
ECHO.[press enter twice to use %vidwidth%x%vidheight%]
ECHO._________________________________________________________
ECHO.
:LOOP1
SET /P width=Enter the width: || 2>NUL SET /A width=%vidwidth% || GOTO :LOOP1
2>NUL SET /A width=%width%/1 || GOTO :LOOP1
IF %width% LSS 2 GOTO :LOOP1
ECHO.
:LOOP11
SET /P height=Enter the height: || 2>NUL SET /A height=%vidheight% || GOTO :LOOP11
2>NUL SET /A height=%height%/1 || GOTO :LOOP11
IF %height% LSS 2 GOTO :LOOP11
ECHO.
SET "scale=scale=%width%:%height%"
SET /A "newaspect=%aspectmultiplier%*%height%/%width%"
SET /A "originalaspect=%aspectmultiplier%*%vidheight%/%vidwidth%"
IF "!newaspect!" NEQ "!originalaspect!" CALL :ASPECTCHANGE
SET newaspect=
SET originalaspect=
GOTO :EOF

:ASPECTCHANGE
CALL :DRAWSETTINGS
ECHO.
ECHO.The aspect ratio is different from the original aspect
ECHO.
ECHO.ratio. The first option will maintain aspect and also
ECHO.
ECHO.crop. This is equivelant to porting to another
ECHO.
ECHO.resolution. Would you like to:
ECHO.
ECHO._________________________________________________________
ECHO.
ECHO. 1 - Resize But Keep The Original Aspect
ECHO.
ECHO. 2 - Stretch Or Shrink The Images To %width%x%height%
ECHO.
CHOICE /n /m "Please Select A Menu Number:" /C:12
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF %K%==1 (
IF %originalaspect% GTR %newaspect% SET "scale=scale=%width%:-1"&SET "crop=crop=%width%:%height%"
IF %originalaspect% LSS %newaspect% SET "scale=scale=-1:%height%"&SET "crop=crop=%width%:%height%"
)
IF %K%==2 SET "scale=scale=%width%:%height%"&SET "crop="

GOTO :EOF

:CHANGEFPS
CALL :DRAWSETTINGS
ECHO.
ECHO.Your inbound fps is what you will see the animation being
ECHO.
ECHO.rendered at. Your outbound fps is how many fps the video
ECHO.
ECHO.will be encoded at AND if you export as a mp4 style
ECHO.
ECHO.animation, it will declare the framerate for the mp4s.
ECHO.
ECHO._________________________________________________________
ECHO.
:LOOP6
SET /P fps=Enter your inbound fps? || SET /A "fps=%fps%"
2>NUL SET /A fps=%fps%/1 || GOTO :LOOP6
IF %fps% LSS 1 GOTO :LOOP6
ECHO.
:LOOP10
SET /P fpsout=Enter your outbound fps? || SET /A "fpsout=%fpsout%"
2>NUL SET /A fpsout=%fpsout%/1 || GOTO :LOOP10
IF %fpsout% LSS 1 GOTO :LOOP10
ECHO.
GOTO :EOF