Add MVLog remote worker
This commit is contained in:
parent
8d2d422c6c
commit
d45a15ac7b
2 changed files with 278 additions and 0 deletions
49
README.md
49
README.md
|
|
@ -141,6 +141,55 @@ IMG_002.jpg: Louvre
|
|||
IMG_003.jpg: First line | Second line
|
||||
```
|
||||
|
||||
## MVLog worker
|
||||
|
||||
`mvlog_worker.py` can be run from this machine by cron or a systemd timer to process MVLog jobs stored on the web machine.
|
||||
|
||||
Default paths:
|
||||
|
||||
- remote host: `192.168.0.204`
|
||||
- remote web root: `/var/www/html/mvlog`
|
||||
- inputs: `in-dir/<job>/`
|
||||
- outputs: `out-dir/YYYYMMDD_title.mp4`
|
||||
- per-job state: `in-dir/<job>/.movmaker-state.json`
|
||||
|
||||
The worker:
|
||||
|
||||
1. scans remote `in-dir/`
|
||||
2. computes a fingerprint from input filenames, sizes, and mtimes
|
||||
3. skips jobs whose fingerprint matches a completed state file and whose output exists
|
||||
4. copies changed jobs locally
|
||||
5. renders with `movmaker.py`
|
||||
6. uploads the MP4 atomically to remote `out-dir/`
|
||||
7. removes the old output if the regenerated filename changed
|
||||
8. clears the web metadata cache
|
||||
|
||||
Run once:
|
||||
|
||||
```bash
|
||||
./mvlog_worker.py
|
||||
```
|
||||
|
||||
Process one job:
|
||||
|
||||
```bash
|
||||
./mvlog_worker.py --job romo2026
|
||||
```
|
||||
|
||||
Force regeneration:
|
||||
|
||||
```bash
|
||||
./mvlog_worker.py --job romo2026 --force
|
||||
```
|
||||
|
||||
Pass extra movmaker options:
|
||||
|
||||
```bash
|
||||
./mvlog_worker.py --movmaker-arg=--preview
|
||||
```
|
||||
|
||||
Recommended scheduling is a systemd timer or cron with a separate lock, e.g. every 5 minutes.
|
||||
|
||||
## Usage
|
||||
|
||||
Basic:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue