Files
teslayoutube/config.py
Erhan Keseli 74f49c7712 Initial commit: ASCILINE YouTube Streamer
ASCII-art YouTube streaming for the Tesla in-car browser.

- FastAPI server on a Mac mini, no Docker.
- yt-dlp resolver: ID/URL/search.
- ffmpeg with -re -fps_mode cfr for source-paced video; trivial drain
  consumer.  Separate ffmpeg for AAC/ADTS audio.
- Vendored ASCILINE renderer (MIT) for the binary wire protocol; pure
  fillText color path, on-demand selection flush.
- HMAC PIN-gated cookie; Secure flag scheme-aware so /audio works on
  plain http during local dev.
- LOW preset (120x50 24fps) verified clean on M4: FPS 24/24, JIT ~42ms.
2026-06-13 18:05:19 +02:00

34 lines
626 B
Python

"""Quality presets and server defaults.
Preset change requires re-Play (server restarts ffmpeg with new scale).
"""
PRESETS = {
"low": {
"cols": 120,
"rows": 50,
"fps_cap": 24,
"mode": 2, # 512 colors
},
"med": {
"cols": 160,
"rows": 68,
"fps_cap": 30,
"mode": 3, # 32K colors
},
"high": {
"cols": 200,
"rows": 84,
"fps_cap": 30,
"mode": 3, # 32K colors
},
}
DEFAULT_PRESET = "low"
SERVER_DEFAULTS = {
"port": 8000,
"bind": "0.0.0.0",
"max_source_height": 720,
}