From a768ef3905d3023a9f580bbe9f04da80e935e7dd Mon Sep 17 00:00:00 2001 From: Zen Date: Thu, 7 Jan 2021 14:25:06 +0200 Subject: [PATCH] small stuff and docs --- av1an/ffmpeg/ffmpeg.py | 2 +- av1an/manager/Queue.py | 15 ++------------- docs/TargetQuality.md | 7 ++++--- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/av1an/ffmpeg/ffmpeg.py b/av1an/ffmpeg/ffmpeg.py index 0845fbb..a980c7e 100755 --- a/av1an/ffmpeg/ffmpeg.py +++ b/av1an/ffmpeg/ffmpeg.py @@ -7,7 +7,7 @@ from subprocess import PIPE, STDOUT from typing import List from av1an.logger import log -# TODO: redo to module +# TODO: redo to module, add ffmpeg scenedetection for fallback def frame_probe_ffmpeg(source: Path): """ diff --git a/av1an/manager/Queue.py b/av1an/manager/Queue.py index d5e5873..c44e390 100644 --- a/av1an/manager/Queue.py +++ b/av1an/manager/Queue.py @@ -27,18 +27,6 @@ class Queue: self.thread_executor = concurrent.futures.ThreadPoolExecutor() self.status = 'Ok' - def is_empty(self): - return self.queue == [] - - def enqueue(self, chunk): - self.queue.insert(0,chunk) - - def dequeue(self): - return self.queue.pop() - - def size(self): - return len(self.queue) - def encoding_loop(self): with concurrent.futures.ThreadPoolExecutor(max_workers=self.project.workers) as executor: future_cmd = {executor.submit(self.encode_chunk, cmd): cmd for cmd in self.chunk_queue} @@ -54,7 +42,8 @@ class Queue: def encode_chunk(self, chunk: Chunk): """ - Encodes a chunk. If chunk fails, restarts it limited amount of times + Encodes a chunk. If chunk fails, restarts it limited amount of times. + Return if executed just fine, sets status fatal for queue if failed :param chunk: The chunk to encode :return: None diff --git a/docs/TargetQuality.md b/docs/TargetQuality.md index 329b2da..222269e 100644 --- a/docs/TargetQuality.md +++ b/docs/TargetQuality.md @@ -29,8 +29,7 @@ Target Quality has a really simple goal, instead of guessing what the CQ/CRF val - x264 - vpx -- Quality/Constant Rate control (Target quality change crf/cq value for each segment) - - `` +- Quality/Constant Rate control (Target quality change crf/cq value for each segment). Which means that encoders must be in mode that use CRF/CQ and have those options specified ( `--crf 30`, `--cq-level=30`) those values get replaced for each segment ## Commands @@ -42,4 +41,6 @@ Target Quality has a really simple goal, instead of guessing what the CQ/CRF val ## Example of usage -`av1an -i file --target_quality 90` - Will run aomenc with default settings of target_quality \ No newline at end of file +`av1an -i file --target_quality 90` - Will run aomenc with default settings of target_quality + +`av1an -i file --target_quality 95 --vmaf_path "vmaf_v.0.6.3.pkl" --probes 6 ` - With specified path to vmaf model and 6 probes per segment \ No newline at end of file