diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2016-06-01 17:52:26 +0000 |
---|---|---|
committer | User Jack <jack@garcon.2.localnet.cc> | 2016-06-01 17:54:28 +0000 |
commit | a331a508a23d00c0af783005f9d95316be8c8754 (patch) | |
tree | 9c84bf8be9a8ae37be4aa42c37ae83cc0987a5a3 /mediabrowser/ffmpeg.py | |
parent | 0d105546a0b2f168077c8015f72a3235255d4de7 (diff) | |
download | flask-mediabrowser-a331a508a23d00c0af783005f9d95316be8c8754.tar.gz flask-mediabrowser-a331a508a23d00c0af783005f9d95316be8c8754.zip |
use different poster command
Diffstat (limited to 'mediabrowser/ffmpeg.py')
-rw-r--r-- | mediabrowser/ffmpeg.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mediabrowser/ffmpeg.py b/mediabrowser/ffmpeg.py index dfdc619..4aeaecc 100644 --- a/mediabrowser/ffmpeg.py +++ b/mediabrowser/ffmpeg.py @@ -118,6 +118,14 @@ def calculate_splittimes(ospath, chunk_duration): for (point, nextPoint) in zip([0.0] + points, points + [duration]): yield ("{:0.6f}".format(point), "{:0.6f}".format(nextPoint - point)) +def poster(ospath): + process = LoggedPopen(shlex.split("ffmpeg -v fatal -noaccurate_seek -ss 25.0 -i") + [ospath] + + shlex.split("-frames:v 1 -map 0:v" + " -filter:v \"scale='w=trunc(oh*a/2)*2:h=480'\"" + " -f singlejpeg pipe:"), + stdout=PIPE) + return process + def thumbnail(ospath, width, height): process = LoggedPopen(shlex.split("ffmpeg -v fatal -noaccurate_seek -ss 25.0 -i") + [ospath] + |