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