Skip to content

Instantly share code, notes, and snippets.

@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)
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 / 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
@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 / 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 / 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 / SushiSNK
Created May 14, 2015 23:31
Shingeki no Kyojin - Sushi
Traceback (most recent call last):
File "Work/Sushi/sushi.py", line 797, in <module>
parse_args_and_run(sys.argv[1:])
File "Work/Sushi/sushi.py", line 790, in parse_args_and_run
run(args)
File "Work/Sushi/sushi.py", line 626, in run
script = AssScript.from_file(src_script_path) if script_extension == '.ass' else SrtScript.from_file(src_script_path)
File "/home/yama/Work/Sushi/subs.py", line 126, in from_file
return cls([SrtEvent(x) for x in script.read().replace(os.linesep, '\n').split('\n\n') if x])
File "/home/yama/Work/Sushi/subs.py", line 104, in __init__
@YamashitaRen
YamashitaRen / Error pysubs2
Created May 14, 2015 18:39
/usr/bin/pysubs2.py error
[yama@VaioLaptop pysubs2]$ ls /usr/lib/python3.4/site-packages/pysubs2
__init__.py __main__.py __pycache__ cli.py common.py exceptions.py formatbase.py formats.py jsonformat.py microdvd.py ssaevent.py ssafile.py ssastyle.py subrip.py substation.py time.py
[yama@VaioLaptop pysubs2]$ cat /usr/bin/pysubs2.py
#!/usr/bin/python
import sys
import pysubs2
if __name__ == "__main__":
cli = pysubs2.cli.Pysubs2CLI()
@YamashitaRen
YamashitaRen / sources.list
Last active August 29, 2015 14:20
Fichier sources.list Debian
## Debian
deb http://ftp.fr.debian.org/debian/ jessie main contrib non-free
deb http://ftp.fr.debian.org/debian/ jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
## Marillat
deb http://www.deb-multimedia.org jessie main non-free
--preset <string> Use a preset to select encoding settings [medium]
Overridden by user settings.
- ultrafast:
--no-8x8dct --aq-mode 0 --b-adapt 0
--bframes 0 --no-cabac --no-deblock
--no-mbtree --me dia --no-mixed-refs
--partitions none --rc-lookahead 0 --ref 1
--scenecut 0 --subme 0 --trellis 0
--no-weightb --weightp 0
- superfast: