[Android Themes] makers_mark:
Click the button below for the batch script:

@ECHO OFF

SETLOCAL ENABLEDELAYEDEXPANSION

MODE CON:COLS=57 LINES=80
color 0B
SET "vers=1.61"
TITLE Boot Animation to Mp4 v%vers%
SET /A colines=80
SET "outputtogif="
SET "androidfolder=/data/local/"
SET "savefolder=videos"
SET "ext=jpg"
SET "savename=bootanimation"
SET "quality=-crf 23"
SET "videotype=mp4"
SET "ffdebug=-loglevel fatal"
SET "ffshowb=-hide_banner"
SET "stno=-start_number 0"
SET "stnorng=-start_number_range 99"
IF "%~1"=="-d" (
SET "debugmode=1"
SET "ffdebug=-loglevel debug"
SET "ffshowb=%"
MODE CON:COLS=140 LINES=4000
COLOR 07
)
IF NOT EXIST gifs MKDIR gifs
IF NOT EXIST zips MKDIR zips
IF NOT EXIST %savefolder% MKDIR %savefolder%
IF EXIST concatallthese.txt DEL concatallthese.txt
IF EXIST copylist.txt DEL copylist.txt
IF EXIST temp\ RMDIR temp /s /q

:MAINMENUBA2MP4
IF EXIST concatallthese.txt DEL concatallthese.txt
IF EXIST temp\ RMDIR temp /s /q
CALL :COUNTFILES >NUL 2>&1
CALL :DRAWHEADBA2MP4
CALL :RESETVALUES
ECHO Please choose one of the following...
ECHO[
ECHO 1 - Use ADB to pull your boot animation.
ECHO[
ECHO 2 - Convert zips in the folder "zips"
ECHO[
ECHO 3 - Combine videos in "videos" into one.
ECHO[
ECHO 4 - Exit
ECHO[
CHOICE /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 GOTO :ADBTOGETIT
IF %K%==2 GOTO :BAZIPSFOLDER
IF %K%==3 GOTO :CONCATALL
IF %K%==4 GOTO :FINISH
GOTO :MAINMENUBA2MP4

:ADBTOGETIT
CALL :GETBA
CALL :UNZIP "%savename%.zip"
SET "filename=%savename%.zip"
CALL :STRIP
CALL :READDESC
GOTO :YOURSETTINGS
GOTO :MAINMENUBA2MP4

:BAZIPSFOLDER
IF %filesinbaz% LSS 1 GOTO :MAINMENUBA2MP4
SET /a index=1
FOR /F "delims=" %%E IN ('dir zips\ /a-d-h /b *.zip') DO (
SET "zipfile[!index!]=%%E"
SET /a index+=1
)
SET /A themost=index-1
IF %themost% GTR 72 SET /A colines=%themost% + 10
IF NOT DEFINED debugmode MODE CON:COLS=57 LINES=%colines%
FOR /l %%I in (1,1,%themost%) DO ECHO %%I. !zipfile[%%I]!
ECHO[
ECHO _________________________________________________________
ECHO[
ECHO Choose a number and press enter...
ECHO[
:LOOPBACK
SET /p pickazip=:
IF "%pickazip%"=="" GOTO :LOOPBACK
IF %pickazip% LSS 1 GOTO :LOOPBACK
IF %pickazip% GTR %themost% GOTO :LOOPBACK
SET savename=!zipfile[%pickazip%]!
IF NOT DEFINED debugmode MODE CON:COLS=57 LINES=80
CALL :UNZIP "zips\%savename%"
SET "filename=%savename%"
CALL :STRIP
CALL :READDESC
GOTO :YOURSETTINGS

:STRIP
SET savename=%savename:.zip=%
SET savename=%savename:(=%
SET savename=%savename:)=%
SET savename=%savename: =%
SET savename=%savename:&=%
GOTO :EOF

:RESETVALUES
SET append=
SET "savename=bootanimation"
SET outputtogif=
SET gif=
SET strang=
SET width=
SET height=
SET fps=
SET fpsout=
GOTO :EOF

:FILLTHEVOID
CALL :DRAWSETTINGS
ECHO[
ECHO[
ECHO[
ECHO When you have a 'p'with'0' as the first number on a line
ECHO Android will play the folder until booted. Since there
ECHO will not be a boot, you need to enter how many times you
ECHO want this folder to loop for the video. A "c" then "0"
ECHO is a little different, but if you have a 'c' then '0'
ECHO I would still need a loop value for the video.
ECHO _________________________________________________________
ECHO[
ECHO[
ECHO[
:LOOP2
FOR /L %%P IN (1,1,%staticfoldercount$%) DO (
IF !folderrepeats[%%P]! EQU 0 (
SET /A secondsperloop[%%P]=!frames[%%P]!/%fps% >NUL 2>&1
SET /A secondsperlooprem[%%P]=!frames[%%P]!%%%fps% >NUL 2>&1
ECHO[
ECHO FOLDER %%P: !folder[%%P]! NEEDS A VALUE TO LOOP FOR VIDEO
ECHO[
ECHO One loop of this folder will last !secondsperloop[%%P]! !secondsperlooprem[%%P]!/%fps% seconds
ECHO[
SET /P folderrepeats[%%P]=:
IF "!folderrepeats[%%P]!"=="" GOTO :LOOP2
IF !folderrepeats[%%P]! LSS 1 GOTO :LOOP2
ECHO[
)
)
GOTO :EOF

:DRAWSETTINGS
CLS
ECHO[
ECHO File:%filename%
ECHO ______________________________________________________-_-
FOR /l %%z IN (1,1,%staticfoldercount$%) DO (
SET /A totalwithrepeats[%%z]=!frames[%%z]!*!folderrepeats[%%z]!
SET /A stime[%%z]=!totalwithrepeats[%%z]!/%fps% >NUL 2>&1
SET /A dtime[%%z]=!totalwithrepeats[%%z]!%%%fps% >NUL 2>&1
ECHO %%z: !foldertype[%%z]!	!folderrepeats[%%z]!	!pauselastframe[%%z]!	!folder[%%z]!
)
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[
ECHO Resolution: %width%X%height% @ %fps%fps in and %fpsout%fps out
ECHO[
ECHO FFmpeg quality is set at %quality% on a scale of 0 to 51
ECHO _________________________________________________________
GOTO :EOF

:YOURSETTINGS
CALL :GETEXT 1
CALL :DRAWSETTINGS
SET K=
ECHO[
ECHO[
ECHO[
ECHO[
ECHO Please choose one of the following...
ECHO[
ECHO[
ECHO[
ECHO[
ECHO 1 - Continue, and make %videotype%.
ECHO[
ECHO 2 - Continue, and make %videotype% ^& gif.
ECHO[
ECHO 3 - Change the video compression level.
ECHO[
ECHO 4 - Change the resolution.
ECHO[
ECHO 5 - Change the fps.
ECHO[
ECHO 6 - Reload desc.txt ^<^<reset fps/resolution/repeats^<^<
ECHO[
ECHO 7 - Go back to the Main Menu
ECHO[
ECHO 8 - Exit
ECHO[
ECHO[
ECHO[
CHOICE /C:12345678
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 ERRORLEVEL 8 SET K=8
IF %K%==1 GOTO :LETSDOIT
IF %K%==2 SET "gif=true" & GOTO :LETSDOIT
IF %K%==3 CALL :CHANGECRF
IF %K%==4 CALL :CHANGERES
IF %K%==5 CALL :CHANGEFPS
IF %K%==6 CALL :READDESC
IF %K%==7 GOTO :MAINMENUBA2MP4
IF %K%==8 GOTO :FINISH
GOTO :YOURSETTINGS

:CHANGECRF
CALL :DRAWSETTINGS
ECHO[
ECHO[
ECHO[
ECHO[
ECHO _________________________________________________________
ECHO The default crf value is 23. You can set it all the way
ECHO to 0 for lossless compression. Your video player more
ECHO than likely won't even play it. Youtube will though!
ECHO _________________________________________________________
:LOOP3
ECHO[
SET /p crf=What quality (0-51)?
IF "%crf%"=="" GOTO :LOOP3
IF %crf% LSS 0 GOTO :LOOP3
IF %crf% GTR 51 GOTO :LOOP3
SET "quality=%quality:~0,5%%crf%"
GOTO :EOF

:CHANGEFPS
CALL :DRAWSETTINGS
ECHO[
ECHO[
ECHO[
ECHO[
ECHO _________________________________________________________
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.
ECHO _________________________________________________________
ECHO[
SET /P fps=Enter your inbound fps?
ECHO[
SET /P fpsout=Enter your outbound fps?
ECHO[
GOTO :EOF

:CHANGERES
CALL :DRAWSETTINGS
ECHO[
ECHO[
ECHO[
ECHO[
ECHO _________________________________________________________
ECHO[
ECHO Some boot animations have a very narrow height. A mp4
ECHO[
ECHO may turn out corrupt because of this. If you have an
ECHO[
ECHO issue with a boot animation of this type, add 100 pixels
ECHO[
ECHO or so to the HEIGHT.
ECHO _________________________________________________________
ECHO[
SET /P width=Enter the width?
ECHO[
SET /P height=Enter the height?
ECHO[
GOTO :EOF

:GETBA
SET "androidfolder=/data/local/"
IF EXIST temp\ RMDIR temp /s /q
CALL :DRAWHEADBA2MP4
ECHO _________________________________________________________
ECHO The default location to get your bootanimation.zip is
ECHO %androidfolder%
ECHO _________________________________________________________
ECHO[
ECHO Please choose one of the following...
ECHO[
ECHO 1 - Pull bootanimation.zip from /data/local/
ECHO[
ECHO 2 - Specify a different location.
ECHO[
ECHO 3 - Specify a different filename ^& location.
ECHO[
ECHO 4 - Go back to the main menu.
ECHO[
ECHO 5 - Exit
ECHO[
ECHO[
CHOICE /C:12345
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 %K%==1 (SET "androidfolder=/data/local/"
SET "savename=bootanimation"
CALL :PULLBA
GOTO :EOF)
IF %K%==2 CALL :NEWFOLDER
IF %K%==3 CALL :NEWFOLDERANDFILE
IF %K%==4 GOTO :MAINMENUBA2MP4
IF %K%==5 GOTO :FINISH
SET "androidfolder=/data/local/"
GOTO :EOF

:NEWFOLDER
CALL :DRAWHEADBA2MP4
ECHO[
ECHO Enter the location in the format of /folder/folder/
ECHO OR /folder/
ECHO[
SET /P androidfolder=:
SET "savename=bootanimation"
CALL :PULLBA
GOTO :EOF

:NEWFOLDERANDFILE
CALL :DRAWHEADBA2MP4
ECHO[
ECHO Enter the location in the format of /folder/folder/
ECHO OR /folder/
ECHO[
SET /P androidfolder=:
ECHO[
ECHO Enter the name of the zip file.
ECHO[
SET /P savename=:
SET savename=%savename:.zip=%
CALL :PULLBA
GOTO :EOF

:PULLBA
ADB kill-server -d >NUL 2>&1
ECHO[
ECHO[
ADB pull %androidfolder%%savename%.zip %savename%.zip >NUL 2>&1
IF ERRORLEVEL 1 (cls
ECHO[
ECHO THERE WAS AN ERROR!
ECHO[
ECHO Either %savename%.zip wasn't in %androidfolder%
ECHO[
ECHO OR....
ECHO ______________________________________________________
ECHO Adb is not properly connected.
ECHO[
ECHO Try "Safely Removing" your device from your computer
ECHO[
ECHO Then unplug your usb cable, and reinsert it.
ECHO ______________________________________________________
ECHO[
ECHO[
ECHO Press any key to try again.
ECHO[
ECHO[
PAUSE >NUL
GOTO :GETBA
)
SET filename=%savename%.zip
GOTO :EOF

:DRAWHEADBA2MP4
CLS
ECHO[
ECHO ______________________________________________________-_-
ECHO[
ECHO Boot Animation 2 %videotype% v%vers%
ECHO[
ECHO _________________________________________________________
ECHO[
ECHO Written by makers_mark
ECHO[
ECHO _________________________________________________________
ECHO[
GOTO :EOF

:READDESC
SET /a staticfoldercount$=0
FOR /F "tokens=1-3 delims= " %%L IN ('FINDSTR /I "^[0-9]" "%~dp0temp\desc.txt"') DO CALL :GETRES %%L %%M %%N
FOR /F "tokens=1-4 delims= " %%L IN ('FINDSTR /I "^P ^C" "%~dp0temp\desc.txt"') DO CALL :FOLDERS %%L %%M %%N %%O
CALL :FILLTHEVOID
GOTO :EOF

:GETRES
SET /A width=%1
SET /A height=%2
SET /A fps=%3
SET /A fpsout=%fps%
GOTO :EOF

:FOLDERS
SET /A staticfoldercount$+=1
FOR /F %%A in ('dir temp\%~4\*.* /a-d-s-h /b ^| FIND /v /c ""') DO SET /A filesinfolder[%staticfoldercount$%]=%%A
SET foldertype[%staticfoldercount$%]=%1
SET /A folderrepeats[%staticfoldercount$%]=%2
SET /A pauselastframe[%staticfoldercount$%]=%3
SET folder[%staticfoldercount$%]=%4
SET /A frames[%staticfoldercount$%]=!filesinfolder[%staticfoldercount$%]! + !pauselastframe[%staticfoldercount$%]!
CALL :GETEXT %staticfoldercount$%
GOTO :EOF

:GETEXT
FOR %%f IN (temp\!folder[%~1]!\*.*) DO SET "ext=%%f"
SET extinfolder[%~1]=!ext:~-3!
GOTO :EOF

:LETSDOIT
CALL :DRAWSETTINGS
ECHO[
CALL :NAMEPREFIX
IF DEFINED gif SET "outputtogif=-y gifs\%savename%.gif"
SET /A checkheight=%height%%%2
SET /A checkwidth=%width%%%2
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 (
ECHO %%A/!staticfoldercount$!...!folder[%%A]!..........
IF !pauselastframe[%%A]! GEQ 1 CALL :COPYREPEATEDFRAMES %%A >NUL 2>&1
CALL :RENUM "!folder[%%A]!" !extinfolder[%%A]! >NUL 2>&1
FFMPEG %ffdebug% %ffshowb% %stno% %stnorng% -f image2 -r %fps% -i temp\!folder[%%A]!\%%08d.!extinfolder[%%A]! -tune stillimage -c:v libx264 -s %width%x%height% -vf "fps=%fpsout%, format=yuv420p" %quality% -y "temp\buffer\%%A%savename%.%videotype%" || GOTO :FFVIEW
ECHO !folder[%%A]! complete
IF !pauselastframe[%%A]! GEQ 1 CALL :TRIMFRAMES %%A >NUL 2>&1
FOR /L %%J in (1,1,!folderrepeats[%%A]!) DO ECHO file temp\\buffer\\%%A%savename%.%videotype%>>copylist.txt
)
IF %checkheight% EQU 1 SET /A height+=1
IF %checkwidth% EQU 1 SET /A width+=1
SET checkheight=
SET checkwidth=
GOTO :FINISHVIDEO

:TRIMFRAMES
SET /A piks=!filesinfolder[%~1]!
FOR /F "skip=%piks% eol=: delims=" %%F IN ('dir "temp\!folder[%~1]!\*.!extinfolder[%~1]!" /a-d-h/b /on ') DO DEL temp\!folder[%~1]!\%%F
GOTO :EOF

:COPYREPEATEDFRAMES
FOR /F "delims=" %%t IN ('dir "temp\!folder[%~1]!\*.!extinfolder[%~1]!" /a-d-h /on /b') DO SET "filetocopy=%%t"
FOR /L %%Y IN (1,1,!pauselastframe[%~1]!) DO COPY temp\!folder[%~1]!\%filetocopy% temp\!folder[%~1]!\z%%Y%filetocopy%
GOTO :EOF

:NAMEPREFIX
SET append=%TIME::=_%
SET append=%append:.=%
SET savename=%fps%_%fpsout%_%width%X%height%_crf%quality:~-2%_%savename%%append%
SET savename=%savename: =%
GOTO :EOF

:FINISHVIDEO
FFMPEG %ffdebug% %ffshowb% -f concat -i copylist.txt -vcodec copy -y %savefolder%\%savename%.%videotype% %outputtogif% || GOTO :FFVIEW
IF NOT EXIST %savefolder%\%savename%.%videotype% GOTO :FFVIEW
ECHO ______________________________________________________-_-
ECHO[
ECHO \\\\\\\\\\\\\\\\\\\\\\\\\\DONE///////////////////////////
ECHO[
ECHO Video saved as:\%savefolder%\
ECHO %savename%.%videotype%
IF DEFINED outputtogif (
ECHO _________________________________________________________
ECHO Gif saved as:\gifs\
ECHO %savename%.gif
ECHO[
)
ECHO[
ECHO //////////////////////////DONE\\\\\\\\\\\\\\\\\\\\\\\\\\\
ECHO _________________________________________________________
SET "outputtogif="
SET gif=
SET "savename=%filename%"
CALL :STRIP
ECHO Press a key to continue
PAUSE >NUL
DEL /Q temp\buffer\*.%videotype%
DEL copylist.txt
GOTO :YOURSETTINGS

:CONCATALL
IF %filesinbav% LSS 1 GOTO :MAINMENUBA2MP4
IF EXIST concatallthese.txt DEL concatallthese.txt
CALL :DRAWHEADBA2MP4
ECHO[
ECHO _________________________________________________________

ECHO This will put all videos together that are currently in
ECHO[
ECHO the folder videos\ You might experience errors with
ECHO[
ECHO the video or no video produced if the resolutions are
ECHO[
ECHO different on a video to video comparison basis.
ECHO _________________________________________________________
ECHO I highly recommend you to hit option 2 to only use
ECHO[
ECHO %videotype%'s that share a common string in the name.
ECHO _________________________________________________________
ECHO[
ECHO 1 - Concatenate ALL videos
ECHO[
ECHO 2 - Concatenate videos that have a common string in name
ECHO[
ECHO 3 - Go back to the main menu
ECHO[
ECHO 4 - Exit
ECHO[
CHOICE /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 :ALL
IF %K%==2 CALL :SOME
IF %K%==3 GOTO :MAINMENUBA2MP4
IF %K%==4 GOTO :FINISH
GOTO :MAINMENUBA2MP4

:SOME
SET strang=
CALL :DRAWHEADBA2MP4
SET /a index=1
FOR /F %%E in ('dir %savefolder%\*.%videotype% /a-d-h /b') DO (
SET "videofile[!index!]=%%E"
SET /a index+=1
)
SET /a themost=index-1
SET /a linesinsome=%themost% + 40
IF NOT DEFINED debugmode MODE CON:COLS=57 LINES=%linesinsome%
ECHO _________________________________________________________
FOR /l %%I in (1,1,%themost%) DO ECHO !videofile[%%I]!
ECHO _________________________________________________________

ECHO[
ECHO Please enter a search string. I will put together all
ECHO[
ECHO the files that contain whatever you type. Don't mix
ECHO[
ECHO files with different compression settings, and in some
ECHO[
ECHO cases resolutions. The compression setting value for
ECHO[
ECHO each file can be found right after the resolution in the
ECHO[
ECHO the file name. Default is crf 23.
ECHO[
ECHO An idea for a search string is the resolution...
ECHO or the crf value.....
ECHO[
:TRYITAGAIN
SET /P strang=:
ECHO[

FOR /F %%E IN ('dir %savefolder%\*.%videotype% /a-d-h /b^|findstr /rmic:"%strang%"') DO (ECHO file %savefolder%\\%%E>>concatallthese.txt
ECHO %savefolder%\%%E.%videotype% Added.
)
IF NOT EXIST concatallthese.txt GOTO :TRYITAGAIN
ECHO _________________________________________________________
ECHO[
ECHO These are the files matching: %strang%
ECHO[
ECHO 1 - Go back to the main menu
ECHO[
ECHO 2 - Continue
ECHO[
CHOICE /C:12
IF ERRORLEVEL 1 SET K=1
IF ERRORLEVEL 2 SET K=2
IF %K%==1 (IF NOT DEFINED debugmode (MODE CON:COLS=57 LINES=80)
GOTO :MAINMENUBA2MP4)
IF %K%==2 CALL :NAMECONCATALL %strang%
CALL :MAKECONCAT
IF NOT DEFINED debugmode (MODE CON:COLS=57 LINES=80)
GOTO :MAINMENUBA2MP4

:ALL
FOR /F %%E IN ('dir %savefolder%\*.%videotype% /a-d-h /b') DO (ECHO file %savefolder%\\%%E>>concatallthese.txt
ECHO %savefolder%\%%E Added.
)
CALL :NAMECONCATALL
CALL :MAKECONCAT
GOTO :MAINMENUBA2MP4

:MAKECONCAT
IF NOT EXIST concatallthese.txt GOTO :EOF
ECHO[
ECHO _________________________________________________________
ECHO[
FFMPEG %ffdebug% %ffshowb% -f concat -i concatallthese.txt -vcodec copy -y %savefolder%\%savename%.%videotype% || GOTO :FFVIEW
ECHO[
ECHO Saved as:%savefolder%\%savename%.%videotype%
PAUSE >NUL
IF NOT DEFINED debugmode (MODE CON:COLS=57 LINES=80)
IF EXIST concatallthese.txt DEL concatallthese.txt
GOTO :MAINMENUBA2MP4

:RENUM
SET "index=00000000"
SET /A Q=1%index%
FOR /F "delims=" %%a IN ('dir temp\%~1\*.%~2/a-d-h /b *.%~2^|findstr /rxvc:"......[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\.%~2"') DO (
SET /a Q+=1
SET "name=%%~na"
REN "temp\%~1\%%~a" "!Q:~-8!%%~xa"
)
GOTO :EOF

:UNZIP
IF NOT EXIST temp\ MKDIR temp\
cd temp
IF NOT EXIST buffer\ MKDIR buffer\
cd..
CALL :DRAWHEADBA2MP4
7ZA -y x %1 -o"%~dp0temp" >NUL 2>&1
IF NOT EXIST temp\desc.txt 7za -y x temp\system\media\*.zip -o"%~dp0temp" >NUL 2>&1
IF NOT EXIST temp\desc.txt (
CALL :DRAWHEADBA2MP4
ECHO[
ECHO _________________________________________________________
ECHO[
ECHO There isn't a desc.txt file in that zip...
ECHO[
ECHO Error was with the following zip file.
ECHO[
ECHO %1
ECHO[
ECHO Press any key to continue to the main menu.
ECHO[
PAUSE >NUL
RMDIR temp /s /q
GOTO :MAINMENUBA2MP4)
IF NOT EXIST zips\ MKDIR zips\
MOVE %~1 zips\%~1 >NUL 2>&1
GOTO :EOF

:NAMECONCATALL
SET savename=%TIME::=_%
SET savename=%savename:.=%
SET savename=%savename: =%
SET savename=%~1%savename%CC
GOTO :EOF

:COUNTFILES
FOR /F %%A IN ('dir videos\*.%videotype% /a-d-s-h /b ^| FIND /v /c ""') DO SET /A filesinbav=%%A >NUL 2>&1
FOR /F %%A IN ('dir zips\*.zip /a-d-s-h /b ^| FIND /v /c ""') DO SET /A filesinbaz=%%A >NUL 2>&1

GOTO :EOF
:FFVIEW
ECHO[
ECHO[
ECHO _________________________________________________________
ECHO[
ECHO[
ECHO[
ECHO There was an error within FFmpeg. Run ba2mp4.bat -d
ECHO[
ECHO ^(with the parameter -d at the end^). The easiest way to
ECHO[
ECHO do this is right click in windows on ba2mp4 file and
ECHO[
ECHO in the menu select create shortcut. Right click on
ECHO[
ECHO the new shortcut, it will be "ba2mp4.bat - Shortcut"
ECHO[
ECHO select "Properties" and at the end of the target
ECHO[
ECHO (outside of the quote marks) put a -d
ECHO[
ECHO Now double click on the shortcut you made and see what
ECHO[
ECHO error messages come up while you try and repeat the
ECHO[
ECHO error in FFmpeg. If you PM me I will try and help you.
PAUSE >NUL

:FINISH
ADB kill-server -d >NUL 2>&1
IF EXIST temp\ RMDIR temp /s /q
ENDLOCAL
EXIT