From 67f6ce308bdef8c6029179a0b9ebed79bf560ada Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 7 Aug 2024 21:39:23 +0200 Subject: [PATCH] Add .env.example specifically for gocoder --- transcoder/.env.example | 29 +++++++++++++++++++++++++++++ transcoder/src/hwaccel.go | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 transcoder/.env.example diff --git a/transcoder/.env.example b/transcoder/.env.example new file mode 100644 index 00000000..cfe34e02 --- /dev/null +++ b/transcoder/.env.example @@ -0,0 +1,29 @@ +# vi: ft=sh +# shellcheck disable=SC2034 + + +# where to store temporary transcoded files +GOCODER_CACHE_ROOT="/cache" +# where to store extracted data (subtitles/attachments/comptuted thumbnails for scrubbing) +GOCODER_METADATA_ROOT="/metadata" +# path prefix needed to reach the http endpoint +GOCODER_PREFIX="" +# base absolute path that contains video files (everything in this directory can be served) +GOCODER_SAFE_PATH="/video" +# hardware acceleration profile (valid values: disabled, vaapi, qsv, nvidia) +GOCODER_HWACCEL="disabled" +# the preset used during transcode. faster means worst quality, you can probably use a slower preset with hwaccels +# warning: using vaapi hwaccel disable presets (they are not supported). +GOCODER_PRESET="fast" +# the vaapi device path (only used with GOCODER_HWACCEL=vaapi) +GOCODER_VAAPI_RENDERER="/dev/dri/renderD128" +# the qsv device path (only used with GOCODER_HWACCEL=qsv) +GOCODER_QSV_RENDERER="/dev/dri/renderD128" + +# Database things +POSTGRES_USER= +POSTGRES_PASSWORD= +POSTGRES_DB= +POSTGRES_SERVER= +POSTGRES_PORT=5432 +# (the schema "gocoder" will be used) diff --git a/transcoder/src/hwaccel.go b/transcoder/src/hwaccel.go index c3c9ae3e..561176b7 100644 --- a/transcoder/src/hwaccel.go +++ b/transcoder/src/hwaccel.go @@ -18,7 +18,7 @@ func DetectHardwareAccel() HwAccelT { preset := GetEnvOr("GOCODER_PRESET", "fast") switch name { - case "disabled": + case "disabled", "cpu": return HwAccelT{ Name: "disabled", DecodeFlags: []string{},