Files
ythdd/config.default.toml
sherl 2b24fc2906 feat: videoplayback proxying
adds support for proxying videos through the instance
the support is configurable, and disabled by default
2025-10-05 19:59:23 +02:00

47 lines
2.3 KiB
TOML

[general]
db_file_path = "ythdd_db.sqlite" # Path to the databse file, preferably stored on an SSD.
video_storage_directory_path = "/path/to/videos/" # Path to video vault.
is_proxied = false # Set to true if running behind reverse proxy.
public_facing_url = "http://127.0.0.1:5000/" # Used for URL rewriting. Note the trailing backslash /.
debug = false # Whether to print verbose, debug info on API endpoints.
cache = true # Whether to cache requests for 3 hours (temporary solution to long load times).
[api]
api_key = "" # Leave empty API key for public access to non-sensitive backend
api_key_admin = "CHANGEME" # Empty *admin* API key will autogenerate a random one every launch.
[extractor]
user-agent = "" # Leave empty for default (Firefox ESR).
cookies_path = "" # Leave empty for none.
preferred_extractor = "" # Leave empty for default (android_vr).
[proxy]
user-agent = "" # Leave empty for default (Firefox ESR).
allow_proxying_videos = false # Whether to allow video proxying through the instance (traffic-intensive).
match_initcwndbps = true # Experimental: matches proxying speed to the one suggested by Innertube (may help avoid being ratelimited/banned).
[admin]
# List of users with admin priviledges.
admins = ["admin"]
[yt_dlp]
# ...
[postprocessing]
# Presets passed to yt-dlp. Reencoding uses ffmpeg to
presets = [
# First entry is the default.
# Naming convention:
# [N] - native video, as downloaded from youtube
# [R] - ffmpeg-reencoded file
# V+A - video with audio
{name="recommended: [N][<=720p] best V+A", format="bv[height<=720]+ba", reencode=""},
{name="[N][1080p] best V+A", format="bv[height=1080]+ba", reencode=""},
{name="[R][1080p] webm", format="bv[height=1080]+ba", reencode="webm"},
{name="[N][720p] best V+A", format="bv[height=720]+ba", reencode=""},
{name="[R][720p] webm", format="bv[height=720]+ba", reencode="webm"},
{name="[N][480p] best V+A", format="bv[height=480]+ba", reencode=""},
{name="[480p] VP9 webm/reencode", format="bv*[height=480][ext=webm]+ba/bv[height=480]+ba", reencode="webm"},
{name="[N][1080p] best video only", format="bv[height=1080]", reencode=""},
{name="[N][opus] best audio only", format="ba", reencode="opus"}
]