Re-encode cached videos to HEVC when it saves at least 15 percent and serve them only to devices that can decode HEVC

This commit is contained in:
Jonathan Sykes
2026-09-13 21:09:15 +08:00
parent 91dab289c3
commit 8b0060d42a
7 changed files with 159 additions and 55 deletions

View File

@@ -16,10 +16,12 @@ services:
# MEDIA_CACHE_MAX_BYTES: "10737418240" # 10 GiB, LRU eviction past this
# MEDIA_MIN_FREE_BYTES: "5368709120" # skip caching below 5 GiB free disk
# MEDIA_AUTO_MAX_SECONDS: "3600" # longest video auto-cached on play
# MEDIA_TRANSCODE: "1" # 0 disables the x264 lane
# MEDIA_TRANSCODE: "1" # 0 disables the compression lane
# MEDIA_CODEC: "hevc" # hevc | h264
# MEDIA_CRF: "28"
# MEDIA_PRESET: "slow"
# MEDIA_PRESET: "medium"
# MEDIA_THREADS: "2"
# MEDIA_OPT_MAX_SECONDS: "3600" # don't re-encode videos longer than this
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:3000/api/version"]
interval: 30s