Skip to content

Instantly share code, notes, and snippets.

View rlaphoenix's full-sized avatar

rlaphoenix

View GitHub Profile
@rlaphoenix
rlaphoenix / dvd-plastic-sleeve-buying-guide.md
Last active August 3, 2024 19:20
DVD Plastic Sleeve Buying Guide

DVD Plastic Sleeves

Sizes are WidthxHeight in centimeters when looking at the sleeves in portrait. These were measured with actual sleeves used on actual cases/box-sets. All sizes listed exclude adhesive flap's. I.e., if the sleeve has no flap and is a sort of slip-in sleeve, then it will cover the DVD case just enough.

Buying Guide

When buying sleeves, make sure that you initially exclude the flap's measurement.

@rlaphoenix
rlaphoenix / font_extractor.py
Created March 2, 2024 10:31
Font to PNG Extractor (Supports TTF/OTF)
import shutil
from pathlib import Path
from fontTools.ttLib import TTFont
from PIL import Image, ImageDraw, ImageFont
def main():
font_file = Path("breeze-icons.ttf")
out_folder = Path("icon_images")
@rlaphoenix
rlaphoenix / how_to_verify_a_dvd_iso_backup.md
Created January 8, 2024 02:28
How to verify a DVD ISO Backup

How to verify a DVD ISO Backup

You, Yes YOU, verify your backups!

If you have backups you didn't make, or made years ago, I really recommend you doing the following to make sure it's a proper backup. It's shocking the amount of bad backup's floating around that people pass off as fine. A bad backup that is shared widely can seriously ruin the archive of that content.

Reading ISO metadata

@rlaphoenix
rlaphoenix / discussion_on_deinterlacing_videos_vfr_vst.md
Created January 8, 2024 01:07
Discussion on Deinterlacing Videos and VFR/VST

Discussion on Deinterlacing Videos and VFR/VST

First of all, most encoders do not handle VFR+VST well or at all.

VFR (Variable Frame Rate) When a video switches from one frame rate to another on at least 1 frame.

VST (Variable Scan Type) When a video switches from Interlaced to Progressive, or Progressive to Interlaced, on at least 1 frame.

@rlaphoenix
rlaphoenix / mpeg_4_h264_indexing_and_frame_serving.md
Created January 8, 2024 00:52
MPEG-4/H.264 Indexing and Frame Serving

MPEG-4/H.264 Indexing and Frame Serving

ffmpeg doesn't seem to frame index at all, maybe it doesn't need to. However, if you plan to use AVC videos with AviSynth or VapourSynth or are trying to get the best possible deinterlace, then I recommend using libavcodec's indexing capabilities.

For synth programs, this can be done using L-SMASH-WORKS, do NOT use FFMS2 or ANY ffmpeg based sourcer for synth programs, they are WAYYYY too outdated and I can confirm they break color in specific ways that you WONT notice (proof: https://slow.pics/c/R5sA6wli comparison between ffms2 output vs without)!!

@rlaphoenix
rlaphoenix / mpeg_indexing_and_frame_serving.md
Created January 8, 2024 00:50
MPEG-1 and MPEG-2 Indexing and Frame Serving

MPEG-1 and MPEG-2 Indexing and Frame Serving

ONLY use DGIndex from Donald Graft's dgmpgdec suite. Alternatives like d2vwitch may sound enticing but it's simply not as efficient nor time-tested as DGIndex, even for Linux users (perfect support via Wine).

You can find it here: http://rationalqm.us/dgmpgdec/dgmpgdec.html with v1.5.8 being the latest final version. Source code compilable on Windows using VS2019 is also available and I have to thank Donald Graft for helping me with getting it repackaged from VS 2008 to VS 2019 as it had a fuck ton of breaking changes in terms of compiling on modern machines because of it, which he helped out with since he understood his code base best.

@rlaphoenix
rlaphoenix / Desample.avsi
Created January 7, 2024 07:08 — forked from kgrabs/Desample.avsi
Desampling functions for Avisynth+, replaces DebilinearM and lineart_rpow2
/*Desample.avsi - v1.3
---Included script functions---
DesampleX: Wrapper for doing various things involving DesampleMT, deinterlacers, resizers, and masks
Default behavior identical to DebilinearM, can also function as lineart_rpow2
DeCrossConversionMT: Replacement for ccc, ccc_720
---Requirements---
Avisynth+ r2455-MT or newer
@rlaphoenix
rlaphoenix / peacock.js
Created January 5, 2024 03:14 — forked from xhlove/peacock.js
peacock HMAC key frida hook script, use frida 14.2.18
function jhexdump(array) {
if(!array) return;
console.log("---------jhexdump start---------");
var ptr = Memory.alloc(array.length);
for(var i = 0; i < array.length; ++i)
Memory.writeS8(ptr.add(i), array[i]);
console.log(hexdump(ptr, {offset: 0, length: array.length, header: false, ansi: false}));
console.log("---------jhexdump end---------");
}
@rlaphoenix
rlaphoenix / tv_schedules.md
Last active August 27, 2023 07:44
Historical TV Guide/Schedules APIs and Websites
@rlaphoenix
rlaphoenix / a_is_afk_readme.md
Last active August 25, 2023 20:35
Python script that runs 24/7 hosting a "is user AFK" WebSocket server

Is AFK WebSocket Server

Run the Python script and just like that a Websocket Server on port 8765 will be running.
From here forward/open the port 8765, or reverse proxy it with Caddy or NGINX (I recommend Caddy).

The WebSocket server responds 0x00 byte if the user is currently active. It responds 0x01 byte if the user is currently AFK. You should also check if it fails to connect and mark yourself as Offline.

The xml file is a Windows Task Scheduler export. You need to change the Logon User to your own.
You should also update the path of the actions, i.e. where the script is, or the folder it's in.