Skip to content

marcel1702/transcode-deck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transcode Deck

Flask-basierte Web-App zum Scannen, Queueing und Transkodieren von Videodateien mit HandBrakeCLI. Enthält UI für Dashboard/Queue/History/Settings, persistente Logs und konfigurierbare Post-Checks.

Features

  • Dashboard: Scan mit Cache, Filter/Suche/Status, Mehrfachauswahl, Profilpflicht, Mediainfo-Modal (Raw + kompakt), Lokalisierung der Zeitstempel.
  • Queue: Manuelles Start/Pause/Stop, Status-Badges, ETA aus HandBrake-Logs, Log-Modal, Multi-Remove, Logs mit Timestamp+UUID, harter Stop killt Prozessgruppe, Retry-Logik, sofortige Status-Anzeige (Pause/Start/Stop).
  • History: Abgeschlossene Jobs mit Start/Fertig/Dauer/Size/Ratio/Profil/Log-Link, Log-Modal wie in der Queue.
  • Output: Strategien rename_original/replace/archive (+ Retention), Metadatei pro Output inkl. aktiven Checks und Größen/Ratio.
  • Post-Checks: ffprobe (Video-Stream + Dauer > 0, Pflicht), ffmpeg Null-Decode (optional), mkvmerge (MKV, optional), Mediainfo (optional), konfigurierbare Retries.
  • Benachrichtigung: Pushover (Token/User/Trigger, optional Title/Priority, Test-Push).
  • Konfig: Live-Reload nach Settings-Save (ohne Server-Neustart), Profile-Editor im UI, log_dir konfigurierbar.

Quickstart

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python main.py
  • Aufruf im Browser: http://localhost:5000 (läuft auf 0.0.0.0).
  • Tests: pytest

Konfiguration

  • Hauptdatei: config/config.yaml (für das Repo sind config/config.example.yaml/config/profiles.example.yaml beigelegt).
  • Wichtige Felder:
    • input_paths, include_extensions, path_exclusions (Glob, case-sensitiv, ignoriert Pfade), title_exclusions (Substring, case-insensitiv; getaggt als exclusion)
    • Tools: handbrake, ffprobe, ffmpeg, mkvmerge, mediainfo
    • Output: output_strategy (rename_original|replace|archive), archive_path, archive_retention_days
    • Temp: temp_mode (in-place|temp_dir), temp_dir
    • Verifikation/Retry: max_retries, check_ffmpeg_null, check_mkvmerge, check_mediainfo (ffprobe ist immer aktiv)
    • Pushover: token, user, triggers, optional title, priority
    • profiles_path, log_dir

Logs & Metadata

  • Logs: logs/YYYYMMDDTHHMMSSZ_job_<uuid>.log (mit Start/End-Markern, Retry-Hinweis, Check-Fehlern).
  • History: logs/history.json (persistente Historie, inkl. Log-Pfad, Zeiten, Größen, Ratio).
  • Output-Metadatei: .meta.json neben dem Output, enthält Profil, Container, Quelle, Checks, Command-Args, Größen/Ratio, UUID.

Hinweise zum Repo

  • Sensitive/variable Dateien sind in .gitignore: config/config.yaml, config/profiles.yaml, support_docs/, test_dir/, logs/, .venv/ usw.
  • Verwende die config/config.example.yaml und config/profiles.example.yaml als Vorlage.

Deployment

  • Dev-Server: flask run --host 0.0.0.0 --port 5000 (Debug off empfohlen).
  • Für Produktion: hinter einen WSGI-Server (gunicorn/uwsgi) und Reverse-Proxy stellen, eigene Pfade/Logs/Permissions beachten.

Docker

  • Build: docker build -f docker/Dockerfile -t transcode-deck .
  • Run (Beispiel):
    docker run -p 5000:5000 \
    -v $PWD/config/config.yaml:/app/config/config.yaml:ro \
    -v $PWD/config/profiles.yaml:/app/config/profiles.yaml:ro \
    -v $PWD/logs:/app/logs \
    -v /srv/media/videos:/srv/media/videos:ro \
    -e PORT=5000 \
    transcode-deck
  • Image enthält HandBrakeCLI, ffmpeg/ffprobe, mkvmerge und mediainfo.
  • Falls keine config.yaml/profiles.yaml gemountet sind, kopiert der EntryPoint die Beispiel-Dateien (liegen im Image unter /app/config.examples) ins Laufzeit-Volume.
  • Details/Compose-Beispiel: docker/README.md (Container läuft mit einem Gunicorn-Worker, weil Queue/Scan-Cache im Prozess gehalten werden)

Schneller Compose-Start (Beispiel)

docker-compose.yml im Repo-Root:

services:
  transcode-deck:
    image: transcode-deck
    build:
      context: .
      dockerfile: docker/Dockerfile
    ports:
      - "5000:5000"
    volumes:
      - ./config:/app/config
      - ./logs:/app/logs
      - /home/marcel/Videos:/srv/media/videos
    environment:
      - PORT=5000

Start: docker compose up --build

Tests

pytest

Lizenz

MIT License (siehe LICENSE).

About

Flask UI to scan, queue, and transcode videos with HandBrakeCLI — with history, persistent logs, and configurable post-checks.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors