summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/app.go2
-rw-r--r--app/config.go3
-rw-r--r--config.json5
3 files changed, 6 insertions, 4 deletions
diff --git a/app/app.go b/app/app.go
index a431a1e..aed83c6 100644
--- a/app/app.go
+++ b/app/app.go
@@ -302,7 +302,7 @@ func (a *App) uploadHandler(w http.ResponseWriter, r *http.Request) {
"-i", uf.Name(),
"-y",
"-vf", "thumbnail",
- "-t", "3",
+ "-t", fmt.Sprint(a.Config.Thumbnailer.PositionFromStart),
"-vframes", "1",
"-strict", "-2",
"-loglevel", "quiet",
diff --git a/app/config.go b/app/config.go
index e06fde0..2b11688 100644
--- a/app/config.go
+++ b/app/config.go
@@ -32,7 +32,8 @@ type ServerConfig struct {
// ThumbnailerConfig settings for Transcoder
type ThumbnailerConfig struct {
- Timeout int `json:"timeout"`
+ Timeout int `json:"timeout"`
+ PositionFromStart int `json:"position_from_start"`
}
// Sizes a map of ffmpeg -s option to suffix. e.g: hd720 -> #720p
diff --git a/config.json b/config.json
index 0f6b7c1..eb43aac 100644
--- a/config.json
+++ b/config.json
@@ -13,7 +13,8 @@
"max_upload_size": 104857600
},
"thumbnailer": {
- "timeout": 60
+ "timeout": 60,
+ "position_from_start": 3
},
"transcoder": {
"timeout": 300,
@@ -33,4 +34,4 @@
"copyright": {
"content": "All Content herein Public Domain and User Contributed."
}
-}
+} \ No newline at end of file