Skip to content

Instantly share code, notes, and snippets.

@YamashitaRen
YamashitaRen / fmtconv.sh
Last active August 29, 2015 14:21
fmtconv build script
#!/bin/bash
CC="gcc"
CFLAGS="-march=native -O3 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LIBNAME="libfmtconv.so"
SOURCEFILES=$(echo AvstpWrapper.cpp; echo main.cpp; ls fmtc/*.cpp; ls fmtcl/*.cpp; ls fstb/*.cpp; ls vsutl/*.cpp)
for i in ${SOURCEFILES}; do
@YamashitaRen
YamashitaRen / vsedit.desktop
Last active May 16, 2020 17:27
Raccourci pour VSEdit
[Desktop Entry]
Name=VSEdit
GenericName=VapourSynth Editor
Comment=Create or edit VapourSynth Scripts
Type=Application
MimeType=text/x-vpy;
Exec=env PYTHONPATH=/usr/local/lib/python3.8/site-packages /usr/local/bin/vsedit
Icon=vsedit
Terminal=false
StartupNotify=false
@YamashitaRen
YamashitaRen / mediainfo+.sh
Last active February 22, 2021 16:02
MediaInfoPlus is a convenient wrapper for MediaInfo.
#!/bin/bash
##
hash mediainfo 2>/dev/null || { echo >&2 "MediaInfo n'est pas installé. Installez-le avant de relancer ce script."; exit; }
hash ffmpeg 2>/dev/null || { echo >&2 "FFmpeg n'est pas installé. Installez-le avant de relancer ce script."; exit; }
if [ -z "$1" ]; then echo -e "N'oubliez pas de mettre le nom du fichier vidéo en argument.\nExemple : ./mediainfo+.sh [Katamuki]_Shinsekai_Yori_01_720p10_[A6BA1D0B].mkv"; exit; fi
if [ "$2" != "" ]; then echo -e "Mettez le nom du fichier vidéo entre guillemets.\nExemple : ./mediainfo+.sh \"[Katamuki] Shinsekai Yori 01 720p10 [A6BA1D0B].mkv\""; exit; fi
if [ $(ps -hp $$ | awk '{print $5}') != /bin/bash ]; then echo -e "Ce script doit être lancé avec bash.\nExemple : bash mediainfo+.sh [Katamuki]_Shinsekai_Yori_01_720p10_[A6BA1D0B].mkv"; exit; fi
Video="$1"
mediainfo=$(mediainfo "$Video")
@YamashitaRen
YamashitaRen / yakuakefr.patch
Created July 7, 2015 23:08
Màj de la trad de yakuake-kf5
--- yakuake.po.1 2015-07-08 00:58:26.250331036 +0200
+++ yakuake.po 2015-07-08 01:03:14.280323421 +0200
@@ -1385,12 +1385,10 @@
msgstr "Console"
#: app/tabbar.cpp:949
-#, fuzzy, kde-format
-#| msgctxt "@title:tab"
-#| msgid "Shell No. <numid>%1</numid>"
+#, kde-format
FichierSource='mpv-shot0006.png'
import vapoursynth as vs
import functools
core=vs.get_core()
def band(x,y):
if x==y:
return 255
else:
@YamashitaRen
YamashitaRen / 10-Bit H.264
Last active October 5, 2023 15:54
10-Bit H.264 explanation
10-Bit H.264
For all those who haven’t heard of it already, here’s a quick rundown about the
newest trend in making our encodes unplayable on even more systems: So-called
high-bit-depth H.264. So, why another format, and what makes this stuff
different from what you know already?
First off: What is bit depth?
In short, bit depth is the level of precision that’s available for storing color
information. The encodes you’re used to have a precision of 8 bits (256 levels)
@YamashitaRen
YamashitaRen / edi_rpow2.py
Last active December 26, 2023 19:33
Put it in Python\Lib\site-packages. Usage : import edi_rpow2 as edi \ edi.nnedi3_rpow2(clip,rfactor,...) \ edi.eedi3_rpow2(clip,rfactor,...) \ edi.eedi2_rpow2(clip,rfactor,...)
def nnedi3_rpow2(clip,rfactor,correct_shift="zimg",nsize=0,nns=3,qual=None,etype=None,pscrn=None,opt=None,int16_prescreener=None,int16_predictor=None,exp=None):
import vapoursynth as vs
core = vs.get_core()
def edi(clip,field,dh):
return core.nnedi3.nnedi3(clip=clip,field=field,dh=dh,nsize=nsize,nns=nns,qual=qual,etype=etype,pscrn=pscrn,opt=opt,int16_prescreener=int16_prescreener,int16_predictor=int16_predictor,exp=exp)
return edi_rpow2(clip=clip,rfactor=rfactor,correct_shift=correct_shift,edi=edi)
def znedi3_rpow2(clip,rfactor,correct_shift="zimg",nsize=0,nns=3,qual=None,etype=None,pscrn=None,opt=None,int16_prescreener=None,int16_predictor=None,exp=None):
@YamashitaRen
YamashitaRen / mt_lutspa.py
Created October 15, 2015 09:04 — forked from tp7/mt_lutspa.py
VSynth lutspa
# -*- coding: utf-8 -*-
import numpy as np
import vapoursynth as vs
def bool_to_number(function):
def wrapped(*args):
value = function(*args)
return np.where(value, np.array(1.0), np.array(-1.0))
return wrapped
@YamashitaRen
YamashitaRen / PKGBUILD
Last active February 14, 2016 16:37
vapoursynth-plugin-havsfunc-git-light
# Maintainer: Yamashita Ren
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>
_plug=havsfunc
pkgname=vapoursynth-plugin-${_plug}-git-light
pkgver=r21.0.g1c17eda
pkgrel=1
pkgdesc="Plugin for Vapoursynth: ${_plug}. (GIT Version, light depends)"
arch=('any')
url='http://forum.doom9.org/showthread.php?t=166582'
import vapoursynth as vs
core = vs.get_core()
ClipA=core.ffms2.Source(source='[HorribleSubs] Kabaneri of the Iron Fortress - 02v2 [1080p].mkv')
ClipA=core.resize.Spline36(ClipA,854,480,vs.YUV440P8)
ClipT=core.ffms2.Source(source='[SAA] Koutetsujou no Kabaneri - 02 vostfr (1280x720 x264 AAC).mkv')
ClipT=core.resize.Spline36(ClipT,1913,1080,vs.YUV440P8)
ClipT=core.std.AddBorders(ClipT,3,4)
ClipT=core.resize.Spline36(ClipT,854,480)