clipwright/.env.example
juancarlos.cavero eb6ef13bba feat(thumbnail): concept-driven thumbnails, crisp burned text, face frames from the video, scored titles
Titles: transcript + 10 frames instead of uploading the whole video (an hour
was ~1M tokens), a brainstorm across fixed styles then a critic that scores,
dedupes by angle and pairs each title with a 1-4 word thumbnail hook. Mobile
rules: payoff inside 50 chars, keyword first. Text model moves to
GEMINI_MODEL_THUMBNAIL (default gemini-3.5-flash); flash-lite is the weakest
tier and this is the one creative step.

Thumbnails: a text call designs N different concepts, one image call each in
parallel. Default burns the hook text with PIL (Anton, black stroke) over
negative space the image model is told to leave, so accents are never wrong;
'AI painted' toggle keeps the old behaviour. Outputs cover-cropped to
1280x720 under YouTube's 2 MB. GET /api/thumbnail/frames/{session} picks
frames with a large, sharp face spread across the runtime and the dashboard
offers them as the person reference. Phone-size preview row in the UI.
JSON parsing now uses raw_decode: flash appended a stray ]} once.
2026-08-27 10:57:34 +02:00

56 lines
2.5 KiB
Text

# AWS S3 (optional — for clip backup/gallery)
AWS_ACCESS_KEY_ID=your_aws_access_key_here
AWS_SECRET_ACCESS_KEY=your_aws_secret_key_here
AWS_REGION=eu-west-3
AWS_S3_BUCKET=your-bucket-name
AWS_S3_PUBLIC_BUCKET=your-public-bucket-name
# YouTube cookies (optional — paste Netscape-format cookies to bypass bot detection)
# YOUTUBE_COOKIES=...
# Google OAuth (cloud/billing mode only). When logging in through a proxy whose
# Host header doesn't match a Google-registered URI (e.g. local dev via the Vite
# proxy), pin the callback explicitly:
# OAUTH_REDIRECT_URI=http://localhost:8000/api/auth/google/callback
# FRONTEND_URL=http://localhost:5175
# Local dev: show the full pipeline logs (yt-dlp/ffmpeg/debug) in the UI even
# when running in paid mode (BILLING_ENABLED). Cloud/prod leaves this unset.
# DEBUG_LOGS=true
# Pre-flight quality gate: warn before processing a YouTube source below this
# height (720p default; 0 disables). Only applies to URL sources.
# QUALITY_GATE_MIN_HEIGHT=720
# Whisper transcription model (main pipeline). "small" is better than "base" on
# non-English audio; "base" is faster. device/compute for GPU tuning.
# Prod GPU: WHISPER_MODEL=large-v3-turbo WHISPER_DEVICE=cuda WHISPER_COMPUTE=float16
# WHISPER_MODEL=small
# WHISPER_DEVICE=cpu
# WHISPER_COMPUTE=int8
# Transcription backend: whisper (default) | parakeet. Parakeet (NVIDIA
# parakeet-tdt-0.6b-v3 via onnx-asr, GPU image only) is ~2x faster than
# whisper-turbo-GPU and auto-falls-back to whisper on errors or languages
# outside its 25 European ones.
# TRANSCRIBE_BACKEND=whisper
# Concurrent GPU transcriptions (parakeet or whisper-on-cuda). Keep 1.
# ASR_GPU_CONCURRENCY=1
# Video encoder for all ffmpeg encodes: x264 (default) | nvenc | auto.
# auto probes h264_nvenc once at startup and falls back to x264 if unusable.
# FFMPEG_ENCODER=x264
# Product analytics (optional, off by default). Both are read by the dashboard
# at BUILD time. Leave them unset and the frontend initialises no analytics and
# loads no third-party script. Set them to your own OpenPanel instance — and add
# your hostname to ANALYTICS_HOSTS in dashboard/index.html — to collect your own.
# VITE_OPENPANEL_API_URL=https://api.openpanel.example.com
# VITE_OPENPANEL_CLIENT_ID=your_openpanel_client_id
# Thumbnail Studio: creative text model (titles, concepts) and the image model.
# Not tied to GEMINI_MODEL on purpose: flash-lite is fine for closed choices,
# visibly worse at titles.
GEMINI_MODEL_THUMBNAIL=gemini-3.5-flash
GEMINI_IMAGE_MODEL=gemini-3.1-flash-image