mirror of
https://github.com/master-of-zen/Av1an.git
synced 2024-11-25 02:29:40 +00:00
more explicit av1an attributes
This commit is contained in:
parent
4a5d68a773
commit
f2d19922c5
2 changed files with 62 additions and 9 deletions
66
av1an.py
66
av1an.py
|
@ -1,19 +1,75 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import json
|
||||
import time
|
||||
import subprocess
|
||||
import concurrent
|
||||
import concurrent.futures
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
from utils import *
|
||||
|
||||
|
||||
class Av1an:
|
||||
"""Av1an - Python framework for AV1, VP9, VP8 encodes."""
|
||||
"""Av1an - Python framework for AV1, VP9, VP8 encoding"""
|
||||
def __init__(self):
|
||||
|
||||
# Input/Output/Temp
|
||||
self.input = None
|
||||
self.temp = None
|
||||
self.output_file = None
|
||||
|
||||
# Splitting
|
||||
self.scenes = None
|
||||
self.split_method = None
|
||||
self.extra_split = None
|
||||
self.min_scene_len = None
|
||||
|
||||
# PySceneDetect split
|
||||
self.threshold = None
|
||||
|
||||
# AOM Keyframe split
|
||||
self.reuse_first_pass = None
|
||||
|
||||
# Encoding
|
||||
self.passes = None
|
||||
self.video_params = None
|
||||
self.encoder = None
|
||||
self.workers = None
|
||||
self.config = None
|
||||
|
||||
self.video_params = None
|
||||
|
||||
# FFmpeg params
|
||||
self.ffmpeg = None
|
||||
self.audio_params = None
|
||||
self.pix_format = None
|
||||
|
||||
|
||||
# Misc
|
||||
self.logging = None
|
||||
self.resume = None
|
||||
self.no_check = None
|
||||
self.keep = None
|
||||
|
||||
# Boost
|
||||
self.boost = None
|
||||
self.boost_range = None
|
||||
self.boost_limit = None
|
||||
|
||||
# Vmaf
|
||||
self.vmaf = None
|
||||
self.vmaf_path = None
|
||||
|
||||
# Target Vmaf
|
||||
self.vmaf_target = None
|
||||
self.vmaf_steps = None
|
||||
self.min_cq = None
|
||||
self.max_cq = None
|
||||
self.vmaf_plots = None
|
||||
|
||||
# get all values from argparse
|
||||
self.__dict__.update(arg_parsing())
|
||||
|
||||
def conf(self):
|
||||
|
|
|
@ -13,13 +13,13 @@ def arg_parsing():
|
|||
parser.add_argument('--output_file', '-o', type=Path, default=None, help='Specify output file')
|
||||
|
||||
# Splitting
|
||||
parser.add_argument('--scenes', '-s', type=str, default=None, help='File location for scenes')
|
||||
parser.add_argument('--split_method', type=str, default='pyscene', help='Specify splitting method',
|
||||
choices=['pyscene', 'aom_keyframes'])
|
||||
parser.add_argument('--extra_split', '-xs', type=int, default=0, help='Number of frames after which make split')
|
||||
parser.add_argument('--min_scene_len', type=int, default=None, help='Minimum number of frames in a split')
|
||||
|
||||
# PySceneDetect split
|
||||
parser.add_argument('--scenes', '-s', type=str, default=None, help='File location for scenes')
|
||||
parser.add_argument('--threshold', '-tr', type=float, default=50, help='PySceneDetect Threshold')
|
||||
|
||||
# AOM Keyframe split
|
||||
|
@ -62,8 +62,5 @@ def arg_parsing():
|
|||
parser.add_argument('--max_cq', type=int, default=50, help='Max cq for target vmaf')
|
||||
parser.add_argument('--vmaf_plots', help='Make plots of probes in temp folder', action='store_true')
|
||||
|
||||
# Server parts
|
||||
parser.add_argument('--host', nargs='+', type=str, help='ips of encoders')
|
||||
|
||||
# Store all vars in dictionary
|
||||
return vars(parser.parse_args())
|
||||
|
|
Loading…
Reference in a new issue