| Crates.io | ffwatch |
| lib.rs | ffwatch |
| version | 0.1.2 |
| created_at | 2025-03-09 21:25:35.573751+00 |
| updated_at | 2025-03-10 04:08:16.869257+00 |
| description | Watch a directory for changes and run ffmpeg |
| homepage | https://github.com/arbezerra/ffwatch |
| repository | https://github.com/arbezerra/ffwatch |
| max_upload_size | |
| id | 1585876 |
| size | 50,586 |
ffwatch is a simple tool to watch a directory for changes and run ffmpeg when a change is detected.
Files found in the directory that have an allowed extension will be enqueued and processed by ffmpeg.
cargo install ffwatch
Best used with docker. Create a docker-compose.yml file with the following content:
services:
ffwatch:
image: arbezerra/ffwatch:latest
volumes:
- ./data:/data
devices:
- /dev/dri:/dev/dri
command:
[
"-c:v",
"libx264",
"-crf",
"20",
"-preset",
"ultrafast",
"-c:a",
"aac",
"-b:a",
"128k",
]
Then run:
docker compose up
| Variable | Description | Default |
|---|---|---|
| WATCH_DIR | Directory to watch | /data/watch |
| COMPLETE_DIR | Directory to move completed files | /data/complete |
| TRANSCODING_DIR | Directory to store currently transcoding files | /data/transcoding |
| ALLOWED_EXTENSIONS | Comma separated list of allowed extensions | mkv,mp4,avi,mov,flv |
| HWACCEL | FFmpeg hardware acceleration | auto |
| PUID | User ID of the resulting files | 1000 |
| PGID | Group ID of the resulting files | 1000 |