Fixes Issue #2 #4
@@ -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
|
||||
Reference in New Issue
Block a user