Fix thumbs gen
This commit is contained in:
parent
3334fd1d14
commit
feeecc44fd
3
app.py
3
app.py
|
@ -172,7 +172,8 @@ def list_media_files(folder):
|
|||
def generate_thumbnails():
|
||||
media_files = list_media_files(upload_folder)
|
||||
for media in media_files:
|
||||
subprocess.call(['ffmpeg', '-i', os.path.join(upload_folder, media), '-q:v', '30', '-s', '160x120', '-vf', 'boxblur=2', '-ss', '00:00:01.000', '-vframes', '1', os.path.join(thumbnails_folder, media) + ".jpg", "-y"])
|
||||
if not os.path.exists(os.path.join(thumbnails_folder, media["filename"]) + ".jpg"):
|
||||
subprocess.call(['ffmpeg', '-i', os.path.join(upload_folder, media["filename"]), '-q:v', '30', '-s', '160x120', '-vf', 'boxblur=2', '-ss', '00:00:01.000', '-vframes', '1', os.path.join(thumbnails_folder, media["filename"]) + ".jpg", "-y"])
|
||||
|
||||
|
||||
def value_in_dict_list(value, dict_list, key):
|
||||
|
|
Loading…
Reference in New Issue