-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_watcher.bat
More file actions
61 lines (54 loc) · 1.43 KB
/
Copy pathstart_watcher.bat
File metadata and controls
61 lines (54 loc) · 1.43 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
55
56
57
58
59
60
61
@echo off
REM HandBrake Folder Watcher Launcher for Windows
REM This script provides an easy way to start the folder watcher
echo HandBrake Folder Watcher
echo =======================
echo.
echo Input folder: %cd%\input
echo Output folder: %cd%\output
echo Done folder: %cd%\done
echo.
REM Create virtual environment if it doesn't exist
if not exist venv (
echo Creating virtual environment...
python -m venv venv
if errorlevel 1 (
echo Error: Failed to create virtual environment
pause
exit /b 1
)
)
REM Activate virtual environment
call venv\Scripts\activate.bat
if errorlevel 1 (
echo Error: Failed to activate virtual environment
pause
exit /b 1
)
REM Check if dependencies are installed
python -c "import watchdog" >nul 2>&1
if errorlevel 1 (
echo Installing dependencies in virtual environment...
pip install -r requirements.txt
if errorlevel 1 (
echo Error: Failed to install dependencies
pause
exit /b 1
)
echo.
)
REM Check if HandBrakeCLI is available
HandBrakeCLI --version >nul 2>&1
if errorlevel 1 (
echo WARNING: HandBrakeCLI not found!
echo Install from: https://handbrake.fr/downloads.php
echo.
choice /C YN /M "Continue anyway"
if errorlevel 2 exit /b 1
echo.
)
echo Starting folder watcher...
echo Drop video files into the 'input' directory to begin encoding.
echo Press Ctrl+C to stop.
echo.
python handbrake_watcher.py