From cd574192bf9438691ad07c09cb157de74cada5e1 Mon Sep 17 00:00:00 2001 From: James Mills Date: Tue, 31 Mar 2020 19:04:21 +1000 Subject: Allow transcoding to smaller sizes a configurable and optional feature --- app/config.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/config.go') diff --git a/app/config.go b/app/config.go index 9c0e733..c93d2a5 100644 --- a/app/config.go +++ b/app/config.go @@ -34,9 +34,13 @@ type ThumbnailerConfig struct { Timeout int `json:"timeout"` } +// Sizes a map of ffmpeg -s option to suffix. e.g: hd720 -> #720p +type Sizes map[string]string + // TranscoderConfig settings for Transcoder type TranscoderConfig struct { - Timeout int `json:"timeout"` + Timeout int `json:"timeout"` + Sizes Sizes `json:"sizes"` } // FeedConfig settings for App Feed. @@ -73,6 +77,7 @@ func DefaultConfig() *Config { }, Transcoder: &TranscoderConfig{ Timeout: 300, + Sizes: Sizes(nil), }, Feed: &FeedConfig{ ExternalURL: "http://localhost:8000", -- cgit v1.2.3