summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2016-01-02 12:56:35 +0100
committerYves Fischer <yvesf-git@xapek.org>2016-01-08 20:38:18 +0100
commitd63cdea1618f3e493a966ce43fb735b0afc098b6 (patch)
tree2e33f35288d4005861a5b69ec8ed5bd47aa96523
parenta11dcb6ae177dfce7725d43a37648770d7340062 (diff)
downloadflask-mediabrowser-d63cdea1618f3e493a966ce43fb735b0afc098b6.tar.gz
flask-mediabrowser-d63cdea1618f3e493a966ce43fb735b0afc098b6.zip
align size of thumb and thumb_video
-rw-r--r--mediabrowser/ffmpeg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mediabrowser/ffmpeg.py b/mediabrowser/ffmpeg.py
index fd1782c..cd10ae4 100644
--- a/mediabrowser/ffmpeg.py
+++ b/mediabrowser/ffmpeg.py
@@ -117,7 +117,7 @@ def calculate_splittimes(ospath, chunk_duration):
def thumbnail(ospath, width, height):
process = LoggedPopen(shlex.split("ffmpeg -v fatal -noaccurate_seek -ss 25.0 -i") + [ospath] +
shlex.split("-frames:v 10 -map 0:v"
- " -filter:v 'scale=w=oh*a:h={}, crop=(min(iw\,{})):(min(ih\,{}))'"
+ " -filter:v \"scale='w=trunc(oh*a/2)*2:h={}', crop='min({},iw):min({},ih)'\""
" -f singlejpeg pipe:".format(height+(height/10), width, height)),
stdout=PIPE)
return process