2 Commits

Author SHA1 Message Date
10d1954125 check_metadata: state tqdm requirement in setup.py 2023-01-01 18:24:05 +01:00
084b27ecd4 Add missing __init__.py files 2023-01-01 18:22:44 +01:00
4 changed files with 7 additions and 4 deletions

View File

View File

@ -9,4 +9,7 @@ setup(
"checkMetadata = checkMetadata.__main__:main" "checkMetadata = checkMetadata.__main__:main"
] ]
}, },
) install_requires=[
'tqdm>=4.62.3'
]
)

View File

View File

@ -10,6 +10,7 @@ import os
import sys import sys
import time import time
import subprocess import subprocess
import shlex
import shutil import shutil
import glob import glob
import PIL import PIL
@ -49,10 +50,9 @@ def get_codec(filename):
return str(result.stdout.decode("utf-8")).rstrip("\n") return str(result.stdout.decode("utf-8")).rstrip("\n")
def extract_frame(video_file, time_offset, output_file): def extract_frame(video_file, time_offset, output_file):
cmd = ["ffmpeg", "-y", "-ss", time.strftime('%H:%M:%S', time.gmtime(time_offset)) + ".00", cmd = "ffmpeg -y -ss " + time.strftime('%H:%M:%S', time.gmtime(time_offset)) + ".00 -i " + str(video_file) + " -frames:v 1 " + str(output_file)
"-i", str(video_file), "-frames:v", "1", str(output_file)]
devnull = open(os.devnull, 'w') devnull = open(os.devnull, 'w')
subprocess.call(cmd, stdout=devnull, stderr=devnull) subprocess.call(shlex.split(cmd),stdout=devnull, stderr=devnull)
def get_font_path(): def get_font_path():
path = "/usr/share/fonts" path = "/usr/share/fonts"