forked from nickn17/evDashVisualizer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGenerateVideo.bat
More file actions
54 lines (40 loc) · 1.28 KB
/
GenerateVideo.bat
File metadata and controls
54 lines (40 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@echo off
REM Clearing the screen
test&cls
REM Create Cache folder if it doesn't exist
echo Cleaning up the current folder...
REM Checking if the Cache folder exists
IF NOT EXIST "Cache" (
MKDIR "Cache"
) ELSE (
DEL /S /Q cache\* >nul 2>&1
)
REM Remove any previous mp4 & mjpeg files
IF EXIST ".\*.mp4" (
DEL /Q *.mp4
)
IF EXIST ".\*.mjpeg" (
DEL /Q *.mjpeg
)
echo [92mCurrent folder has been cleaned up[0m
echo.
:: Prompt the user for the speedup
set /p speedup="Enter the speedup factor (e.g. 7 for 7x speed): "
:: Prompt the user for the zoom level
set /p zoom="Enter the zoom level (e.g. 11 - the higher the value the greater the zoom in effect): "
echo.
echo Creating an mjpeg animation with the following settings: [92mspeedup=%speedup% zoom=%zoom%[0m...
PHP index.php filename=demo_data.json speedup=%speedup% zoom=%zoom% info=1
echo [92mMJPeg animation created[0m
echo.
echo Converting the mjpeg animation to an mp4 file with a 4K resolution[0m...
ffmpeg -hide_banner -loglevel error -i demo_data_map.mjpeg -pix_fmt yuv420p -b:v 8000k -c:v libx264 -vf scale=3840:2160 final_result_4K.mp4
echo [92mMP4 file created[0m
echo.
echo Removing leftover files...
DEL demo_data_map.mjpeg
DEL /S /Q cache\* >nul 2>&1
echo [92mLeftover files removed[0m
echo.
REM EXIT /B
PAUSE