Loading src/resources/helpers.py +15 −0 Original line number Diff line number Diff line Loading @@ -289,6 +289,21 @@ def make_hls(f: Union[models.File, int], force: bool = False): ] subprocess.run(ffmpeg_cmd, check=True) subprocess.run( [ "ffmpeg", "-i", f.local_path(), "-frames:v", "1", "-update", "1", "-vf", "scale=1000:1000:force_original_aspect_ratio=decrease,pad=1000:1000:(ow-iw)/2:(oh-ih)/2:black", f"{hls_destination_dir}thumbnail.jpg", ], check=True, ) def make_iiif(f: Union[models.File, int], force: bool = False): Loading Loading
src/resources/helpers.py +15 −0 Original line number Diff line number Diff line Loading @@ -289,6 +289,21 @@ def make_hls(f: Union[models.File, int], force: bool = False): ] subprocess.run(ffmpeg_cmd, check=True) subprocess.run( [ "ffmpeg", "-i", f.local_path(), "-frames:v", "1", "-update", "1", "-vf", "scale=1000:1000:force_original_aspect_ratio=decrease,pad=1000:1000:(ow-iw)/2:(oh-ih)/2:black", f"{hls_destination_dir}thumbnail.jpg", ], check=True, ) def make_iiif(f: Union[models.File, int], force: bool = False): Loading