Fixes Issue #2 #4

Merged
dafo5502 merged 59 commits from developer into master 2021-10-25 14:41:37 +02:00
Showing only changes of commit 7a29a3b3b3 - Show all commits

View File

@@ -1,8 +1,9 @@
import logging
import multiprocessing as mp
import oset = True
import os
import shutil
import time
from typing_extensions import runtime
import ffmpeg
@@ -164,14 +165,18 @@ class _Worker:
outpath = os.path.join(outdir, outstream)
self.logger.debug("%s - Building slide video from demux.txt", package_id)
start = time.time()
quiet = True
if self.logger.getEffectiveLevel() < logging.INFO:
quiet = False
result, _ = (ffmpeg
.input(demux_file, framerate=25)
.filter('scale', height='min(in_h, {}').format(maxheight, width=-2)
.output(outpath, crf=crf, preset=preset, movflags='faststart', pix_fmt='yuv420p')
.run(quiet=quiet))
start = time.time()
(ffmpeg
.input(demux_file, framerate=25)
.filter('scale', height='min(in_h, {}').format(maxheight, width=-2)
.output(outpath, crf=crf, preset=preset, movflags='faststart', pix_fmt='yuv420p')
.run(quiet=quiet))
runtime = time.time() - start
self.logger.info("%s - Transcoded %s in %s seconds", package_id, outstream, runtime)
return outstream