Skip to content

Instantly share code, notes, and snippets.

@RyougiKukoc
RyougiKukoc / vsTAAmbk.py
Last active June 27, 2026 02:17
vsTAAmbk with mod
import vapoursynth as vs
import mvsfunc as mvf
import havsfunc as haf
import functools
MODULE_NAME = 'vsTAAmbk'
class Clip:
def __init__(self, clip):
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""
Whenever you add an architecture to this page, please also update
`tests/models/registry.py` with example HuggingFace models for it.
"""
import importlib
import os
import pickle
import subprocess
@RyougiKukoc
RyougiKukoc / flac2alac.py
Created September 5, 2024 12:04
transcode flac into alac in mkv files
import os
import subprocess as sp
recursive = True
src_dir = '.'
src_dir = os.path.abspath(src_dir)
def encode(tar_fp, dst_dir_fp):
dst_fp = os.path.join(dst_dir_fp, os.path.basename(tar_fp).replace('FLAC', 'ALAC'))
p = sp.Popen(['mkvmerge', '-i', tar_fp], stdout=sp.PIPE, stderr=sp.PIPE)
from vapoursynth import core
from muvsfunc import SSIM_downsample
__version__ = "k.1.1.0"
def nnedi3_rpow2(clip, rfactor=2, width=None, height=None, correct_shift=True,
kernel="SSIM", nsize=0, nns=3, qual=None, etype=None, pscrn=None,
opt=True, int16_prescreener=None, int16_predictor=None, exp=None, upsizer=None):
@RyougiKukoc
RyougiKukoc / linear_comparison.py
Last active October 26, 2024 17:17
Need to keepthe same number of m2ts and mkv
import vapoursynth as vs
import rksfunc as rks
import os
import random
from awsmfunc import FrameInfo
from math import ceil
from mvsfunc import ToRGB
core = vs.core
core.max_cache_size = 25600
@RyougiKukoc
RyougiKukoc / havsfunc.py
Last active June 27, 2026 02:27
HAvsFunc <7f0a9a7a37b60a05b9f408024d203e511e544a61> with mod
"""
Holy's ported AviSynth functions for VapourSynth.
Main functions:
daa
daa3mod
mcdaa3
santiag
FixChromaBleedingMod
Deblock_QED
@RyougiKukoc
RyougiKukoc / exaudio.py
Created May 3, 2023 06:40
mkv / m2ts audio extractor
import os
import argparse
import sys
import time
import msvcrt
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('-d', type=str, default='./',
help='-d: specify the path to your workspace')
def GCFQP(
vcfile: str,
qpfile: str,
output_chapter: str
):
import xml.etree.ElementTree as xet
import os
os.system(f'mkvmerge -o tmp.mkv "{vcfile}"')
os.system('ffprobe -hide_banner -v error -threads auto -show_frames -of xml -select_streams v:0 -i tmp.mkv > tmp.xml')
@RyougiKukoc
RyougiKukoc / SplitEncodeMerge.py
Last active March 2, 2024 21:02
Split, Encode then Merge for closed GOP hevc or avc file.
# In my (and Magic-Raws') configue, mkvmerge is placed in system path,
# VSPipe.exe in sys.prefix, and x265 (plus x264) in sys.prefix//x26x, so that is default in this function.
def SEM(
fp_vc_input: str,
segment_list: list,
fp_qpfile: str,
x26x_param: str,
fp_vpy: str,
fp_vc_output: str,
force_expand: bool = True
@RyougiKukoc
RyougiKukoc / defilmgrain.py
Last active November 26, 2022 19:39
A function to reduce film grain, included in rksfunc, public here.
from vapoursynth import core, VideoNode
def defilmgrain(clip: VideoNode, s1=16, s2=3, s3=3, g=1.5, dark=10000) -> VideoNode:
from vapoursynth import YUV, GRAY, Error
from fvsfunc import Depth
from havsfunc import QTGMC
from muvsfunc import MergeChroma
from vsutil import get_y, iterate
from dfttest2 import DFTTest