Skip to content

Instantly share code, notes, and snippets.

I hereby release all my anime-related work, including but not limited to work done on subtitles, video, and audio, whenever and wherever it was first published, into the public domain to the greatest extent of my power. This release includes, but is not limited to, anything published under the MTBB and Okay-Subs tags. So don't ask me for permission to use what I've released. It's not mine!

2025-10-28

@motbob
motbob / playback_guide.md
Last active October 28, 2025 12:55

Guide to playing back video in high quality:

If you use mpv: no action needed.
If you use MPC-HC: install madVR and switch to it on the "Output" page in the MPC-HC settings.
If you use VLC: switch to a different player.

Guide to playing subtitles correctly:

If you use mpv: no action needed.
If you use MPC-HC: install version 2.1.3 or later. Go to Options > Subtitles > Default Style and check the "Use libass for SSA/ASS" box in the bottom right. Make sure that in Options > Playback > Output, your subtitle renderer is set to Internal Subtitle Renderer.

Translator’s Corner
Thank you for reading the English release of Holmes of Kyoto! As you may have
noticed, this series is steeped in historical and location-based references, and
a lot of research was needed to make sure the translation was factually sound.
I’ve been given this space to share some of the challenges and considerations
made in localizing this series.
...
@motbob
motbob / find_aom_keyframes.py
Last active December 17, 2021 04:57
find_aom_keyframes.py
import sys
import struct
import os
# This is a script that returns a list of keyframes that aom would likely place. Port of aom's C code.
# Current as of aom 3.2.0.
# It requires an aom first-pass stats file as input. FFMPEG first-pass file is not OK.
# Script has been tested to have ~99% accuracy vs final aom encode.
# The only test that this script does not contain is:
# https://aomedia.googlesource.com/aom/+/refs/tags/v3.2.0/av1/encoder/pass2_strategy.c#2651
import vapoursynth as vs
core = vs.get_core()
import mvsfunc as mvf
offset = 3000
n = 10
space = 1000
width = 1920
height = 1080
import tinycss
import re
import datetime
import math
#Put this script in the same folder as the .css and .vtt
#If you don't know how to get the .css, you'll need to find a different parser
SUBS_FILENAME = 'subs.vtt'
CSS_FILENAME = 'css.css'
// ==UserScript==
// @name nyaablock
// @namespace motbob
// @include https://nyaa.si/*
// @exclude https://nyaa.si/user/*
// @exclude https://nyaa.si/view/*
// @exclude https://nyaa.si/?f=0&c=0_0&q=-filteri*
// @version 1
// @grant none
// ==/UserScript==
Chyuu:
Nanatsu no Taizai -- OTL, full-featured, timely
Fate⁄EXTRA Last Encore -- OTL, full-featured. More than 16 days behind.
Scum:
Nanatsu no Bitoku -- splice of good quality video and bad quality uncensored scenes.
Overlord 2 -- Wakanim video, untouched (?) CR subs
Davinci:
Saiki Kusuo no Psi-nan 2 -- OTL, full-featured, timely