Skip to content

Instantly share code, notes, and snippets.

@Mr-Z-2697
Mr-Z-2697 / x265_march.blake3
Last active September 17, 2024 07:28
some x265 encoded bitstream consistency test. --no-info is used to avoid the influence of SEI informations. encodings ran on Ryzen 9 7950X so native = znver4 (should be) note: the encoded bitrate of all these results are pretty close (if they differ) except clang built x265 after mno-sse produces otherworldly bitrate (included in "mno-a-lot")
55231a43a4ecacf6d45e05985c23d604ac89af67bb2e4e58cdf8d9143dcbe295 8b\x265-3.5.265
55231a43a4ecacf6d45e05985c23d604ac89af67bb2e4e58cdf8d9143dcbe295 8b\x265-3.6.265
55231a43a4ecacf6d45e05985c23d604ac89af67bb2e4e58cdf8d9143dcbe295 8b\x265-4.0.265
f064c6ac6032a31a29df8e70677ad17bda93b8d601d96980575a901891e82130 8b\x265clang.265
55231a43a4ecacf6d45e05985c23d604ac89af67bb2e4e58cdf8d9143dcbe295 8b\x265l.265
1cd2f0715daf3b133dd3c06c3fde0f05ef636ea6e75fcc38a70a33179e99a2e1 8b\x265l-native.265
55231a43a4ecacf6d45e05985c23d604ac89af67bb2e4e58cdf8d9143dcbe295 8b\x265l-x86-64.265
55231a43a4ecacf6d45e05985c23d604ac89af67bb2e4e58cdf8d9143dcbe295 8b\x265l-x86-64-v2.265
c1f9cc41a8fee2bce10527a8e1d3235d2bbe517561c32125d1472ceb3d741d29 8b\x265l-x86-64-v3.265
1cd2f0715daf3b133dd3c06c3fde0f05ef636ea6e75fcc38a70a33179e99a2e1 8b\x265l-x86-64-v4.265
@Mr-Z-2697
Mr-Z-2697 / TVEtifencdaemon.py
Last active June 5, 2022 17:07
When something like Topaz Video Enhance AI outputs image sequences, keep watch the output folder and auto encode into pieces and delete images so besides some extra storage ios you will not be limited by its output formats(which is just kinda crap).
import os,sys
import pathlib
import subprocess
import time
rootd=pathlib.Path(__file__).parent.absolute()
os.chdir(rootd)
while True:
time.sleep(5)
files=list(rootd.glob('*.tif'))
filesb=[os.path.basename(str(n))[:-4] for n in files]
@Mr-Z-2697
Mr-Z-2697 / codepagerename.py
Last active November 5, 2021 21:41
repair filename decoded by incorrect codepage
import os,sys
import pathlib
def ren(x,dryrun):
oripath=pathlib.Path(x).absolute()
oriname=oripath.name
modname=oriname.encode('cp936').decode('cp932')
modpath='\\'.join(str(oripath).split('\\')[:-1]+[modname]) # for windows, this should be modified to work on linux
if not dryrun:
os.rename(oripath,modpath)
else:
#av1 (all) in one
import subprocess
import time
import vapoursynth as vs
from vapoursynth import core
source=r'test.mp4'
cachefile=r'ffindex'
keyint=300
min_keyint=15
@Mr-Z-2697
Mr-Z-2697 / mpv-rife_to60.vpy
Last active May 30, 2024 15:22
Rife frame interpolation VapourSynth script for mpv.
import vapoursynth as vs
from vapoursynth import core
import mvsfunc as mvf
from math import log,ceil,floor
fps = container_fps
css = '4'+['44','22','20'][video_in.format.subsampling_w+video_in.format.subsampling_h]
src = video_in.fmtc.bitdepth(bits=16)
################
# Rife is very computing power intensive, so maybe you should enable these two lines.
'''