core.num_threads = 4 # Sources JP_BD = FileInfo(r'BDMV//00003.m2ts', (24, -24), idx=lambda x: source(x, cachedir=''), preset=[PresetBD, PresetAAC, PresetChapXML]) JP_BD_NCOP = FileInfo(r'BDMV/120926_JOSHIRAKU_VOL1/BDMV/STREAM/00001.m2ts', (24, -24), idx=lambda x: source(x, cachedir='')) JP_BD_NCED = FileInfo(r'BDMV/120926_JOSHIRAKU_VOL1/BDMV/STREAM/00002.m2ts', (24, -24), idx=lambda x: source(x, cachedir='')) JP_BD_03 = FileInfo(r'BDMV/121024_JOSHIRAKU_VOL2/BDMV/STREAM/00000.m2ts', (24, 2182), idx=lambda x: source(x, cachedir='')) JP_BD.name_file_final = VPath(fr"premux/{JP_BD.name} (Premux).mkv") JP_BD.a_src_cut = VPath(f"{JP_BD.name}_cut.aac") JP_BD.do_qpfile = True # OP/ED Variables opstart = 0 edstart = 31888 op_offset = 2 ed_offset = 1 def filterchain() -> Union[vs.VideoNode, Tuple[vs.VideoNode, ...]]: """Main filterchain""" import havsfunc as haf import lvsfunc as lvf import rekt
import vapoursynth as vs from lvsfunc.misc import source from vardautomation import FileInfo, PresetAAC, PresetWEB, VPath from project_module import enc, flt core = vs.core core.num_threads = 4 # Sources JP_CR = FileInfo( r'websrc/CHRONOS RULER E13 [1080p][AAC][JapDub][GerEngSub][Web-DL].mkv', (1224, 3381), idx=lambda x: source(x, force_lsmas=True, cachedir=''), preset=[PresetWEB, PresetAAC]) JP_CR.name_file_final = VPath(f"premux/{JP_CR.name} (Premux).mkv") JP_CR.a_src_cut = VPath(f"{JP_CR.name}_cut.aac") JP_CR.do_qpfile = True def filterchain() -> Union[vs.VideoNode, Tuple[vs.VideoNode, ...]]: """Main filterchain""" import lvsfunc as lvf import muvsfunc as muf import vardefunc as vdf from adptvgrnMod import adptvgrnMod from vsutil import depth, get_w, get_y from xvs import WarpFixChromaBlend src_path = [ r"websrc/CHRONOS RULER E05 [1080p][AAC][JapDub][GerEngSub][Web-DL].mkv",
from bento_filters import flt core = vs.core core.num_threads = 16 EPNUM = __file__[-5:-3] # Sources JPBD_NCOP = FileInfo(r'BDMV/Vol.1/BDMV/STREAM/00003.m2ts', 0, -24, idx=lambda x: source(x, cachedir=''), preset=[PresetBD, PresetFLAC]) JPBD_EP = FileInfo(r'BDMV/Vol.1/BDMV/STREAM/00001.m2ts', 2877, 2877+JPBD_NCOP.clip_cut.num_frames, idx=lambda x: source(x, cachedir=''), preset=[PresetBD, PresetFLAC]) JPBD_NCOP.name_file_final = VPath(fr"premux/{JPBD_NCOP.name} (Premux).mkv") JPBD_NCOP.do_qpfile = True # Common variables replace_op: List[Range] = [(418, 526)] op_aisle: List[Range] = [(281, 373)] red_circle: List[Range] = [(1934, 1951), (1956, 1979), (1984, 2054)] def main() -> vs.VideoNode: """Vapoursynth filtering""" from adptvgrnMod import adptvgrnMod from havsfunc import FastLineDarkenMOD from vsutil import depth
from project_module import encoder as enc from project_module import flt # noqa core = vs.core make_wraw: bool = False # Create a workraw enc_type = 'Premux' if not make_wraw else 'wraw' EP_NUM = __file__[-5:-3] # Sources JP_clip = FileInfo( f'sources/{EP_NUM}/Jahy-sama wa Kujikenai E{EP_NUM} [1080p][AAC][JapDub][GerEngSub][Web-DL].mkv', idx=lambda x: source(x, force_lsmas=True, cachedir=''), preset=[PresetWEB, PresetAAC]) JP_clip.name_file_final = VPath( f"{enc_type.lower()}/Jahy_{EP_NUM} ({enc_type}).mkv") JP_clip.name_clip_output = VPath(JP_clip.name + '.265') JP_clip.do_qpfile = True # Common variables # OP/ED frames opstart: Union[int, bool] = 2014 edstart: Union[int, bool] = 31746 op_offset: int = 1 ed_offset: int = 1 freeze_ranges: List[List[int]] = [ # [start_frame, end_frame, frame] [opstart, opstart + 18, opstart], [opstart + 87, opstart + 96, opstart + 87], [opstart + 201, opstart + 207, opstart], [opstart + 238, opstart + 244, opstart],
# Sources JP_CR = FileInfo( f'sources/{EP_NUM}/Kobayashi-san Chi no Maid Dragon S E{EP_NUM} [1080p][AAC][JapDub][GerEngSub][Web-DL].mkv', idx=lambda x: source(x, force_lsmas=True, cachedir='')) JP_AOD = FileInfo( f'sources/{EP_NUM}/Kobayashi-san Chi no Maid Dragon S E{EP_NUM} [1080p+][AAC][JapDub][GerSub][Web-DL].mkv', idx=lambda x: source(x, force_lsmas=True, cachedir=''), preset=[PresetWEB, PresetAAC]) YT_NCOP = FileInfo( 'sources/【期間限定公開】TVアニメ『小林さんちのメイドラゴンS』ノンテロップオープニング映像-bEb4xT8lnYU.mkv', idx=lambda x: source(x, force_lsmas=True, cachedir='')) YT_NCED = FileInfo( 'sources/【期間限定公開】TVアニメ『小林さんちのメイドラゴンS』ノンテロップエンディング映像-kMWLe37SMBs.mp4', idx=lambda x: source(x, force_lsmas=True, cachedir='')) JP_AOD.name_file_final = VPath(fr"[Premux] Maid Dragon S2 - {EP_NUM}.mkv") JP_AOD.name_clip_output = VPath(JP_AOD.name + '.264') JP_AOD.a_src_cut = VPath(f"{JP_AOD.name}_cut.aac") JP_AOD.do_qpfile = True # Common variables # OP/ED frames opstart: Union[int, bool] = 1582 edstart: Union[int, bool] = False op_offset: int = 1 ed_offset: int = 1 hardsub_sign: List[ Range] = [ # Leftover hardsubbed signs that need a stronger mask (129, 184), (14763, 14950), (23616, 23722), (30563, 30597), (23927, 23991), (16173, 16244), (17328, 17400), (17401, 17472),