lib/video.py in redmine_apijs-6.4.0 vs lib/video.py in redmine_apijs-6.5.0
- old
+ new
@@ -1,9 +1,9 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf8 -*-
# Created J/26/12/2013
-# Updated D/27/09/2020
+# Updated S/07/11/2020
#
# Copyright 2008-2020 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
# https://www.luigifab.fr/redmine/apijs
#
# This program is free software, you can redistribute it or modify
@@ -15,11 +15,10 @@
# but without any warranty, without even the implied warranty of
# merchantability or fitness for a particular purpose. See the
# GNU General Public License (GPL) for more details.
import os
-import re
import sys
from PIL import Image
try:
filein = str(sys.argv[1])
@@ -33,9 +32,10 @@
exit(-1)
if not os.path.exists(os.path.dirname(fileout)):
os.makedirs(os.path.dirname(fileout))
+# Video to image
os.system('ffmpegthumbnailer -i ' + filein + ' -o ' + fileout + ' -q 10 -s ' + str(size[0]))
if os.path.isfile(fileout):
filein = fileout
source = Image.open(filein)
else:
\ No newline at end of file