Skip to content

Instantly share code, notes, and snippets.

@rlaphoenix
rlaphoenix / packer.py
Created June 3, 2020 19:53
Pack rar files into neat split volumes based on max volume size and max volume count.
# std
import os
import glob
import math
import subprocess
import binascii
import argparse
# Arguments
ArgParser = argparse.ArgumentParser()
@rlaphoenix
rlaphoenix / renamer.py
Created June 20, 2020 11:54
Dataset Helper - Renamer: Renames a bunch of png files based on filename integer-wise to start at 1
import argparse
import glob
import os
import re
ArgParser = argparse.ArgumentParser()
ArgParser.add_argument("-i", "--input", help="Input folder", required=True)
args = ArgParser.parse_args()
for n, file_path in enumerate(sorted(
@rlaphoenix
rlaphoenix / cvs2git-just-fucking-work-edition.options
Created July 25, 2020 15:14
cvs2git-just-fucking-work-edition.options
# (Be in -*- mode: python; coding: utf-8 -*- mode.)
#
# ====================================================================
# Copyright (c) 2006-2010 CollabNet. All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://subversion.tigris.org/license-1.html.
# If newer versions of this license are posted there, you may use a
# newer version instead, at your option.
@rlaphoenix
rlaphoenix / start-nitro.bat
Last active July 27, 2020 03:20
start-nitro.bat - Start up a Windows build environment using Cygwin for Nintendo NITRO-System (Nintendo DS) compiling.
@ECHO OFF
REM Set this to the location of the Nitro development files (Don't put a \ or / at the end)
SET NITROENV=C:\Users\PHOENiX\NitroEnv
REM Set this to wherever you wish to store all of the code your gonna compile
SET NITROCODE=C:\Users\PHOENiX\NitroCode
REM Don't edit these
SET CW_NITROSDK_ROOT=%NITROENV%\NitroSDK
@rlaphoenix
rlaphoenix / align_data_sets.py
Last active October 20, 2020 06:27
Align a folder of images with another
import os
import time
import glob
import math
import subprocess
import shutil
from tqdm import tqdm
@rlaphoenix
rlaphoenix / pokemon_home_media_comparison_cheatsheet.md
Last active November 14, 2020 17:40
Pokemon Home Media Comparison Cheatsheet

Notes

  • Seasons and Episode Orders are following TMDB's Order
  • Banned and flashback episodes are not counted towards episode numbers
  • VHS releases are not listed at all here as they have all since been trumped by DVD's or better
  • See here for information on how the Bitrate Scoring works

Legend

Season Releases
Season 1 - Indigo League 9
@rlaphoenix
rlaphoenix / generic.groovy
Last active July 18, 2021 19:25
Generic base style Movies and TV filebot template
{
// Examples:
// "The IT Crowd S01E01 Yesterday's Jam"
// "Luca (2021)"
n + " " + (s00e00 ? (S00E00 + " " + t) : ("(" + y + ")"))
}
@rlaphoenix
rlaphoenix / framestor.groovy
Last active July 26, 2021 04:13
FraMeSToR style P2P Movies and TV filebot template
{
// Requirements: MediaInfo and libmediainfo v19.09 or newer.
// Examples:
// "The.IT.Crowd.S01E01.Yesterdays.Jam.AMZN.1080p.DDP.5.1.AVC.WEB-DL-FraMeSToR"
// "Luca.2021.Repack.BluRay.2160p.HDR.DDP.5.1.Atmos.HEVC.REMUX-FraMeSToR"
def Movie = true;
def Group = "FraMeSToR"; // Only used if no Group Tag is detected in the original filenames
def Source = "BluRay"; // e.g. BluRay, DVD, and so on
def Edition = "Unrated Open Matte"; // If empty or not set, it will be detected from the original filename
@rlaphoenix
rlaphoenix / rpg.groovy
Last active July 26, 2021 04:14
RPG style P2P Movies and TV filebot template. (Note: Specifically designed around DVD REMUXs)
{
// Requirements: MediaInfo and libmediainfo v19.09 or newer.
// Examples:
// "The.IT.Crowd.S01E01.Yesterdays.Jam.PAL.DVD.DD.2.0.MPEG-2.REMUX-RPG"
// "Luca.2021.Repack.NTSC.DVD.DD.5.1.MPEG-2.REMUX-RPG"
def Movie = false;
def Group = "RPG"; // Only used if no Group Tag is detected in the original filenames
def Source = "DVD"; // e.g. BluRay, DVD, and so on
def Edition = "Unrated Open Matte"; // If empty or not set, it will be detected from the original filename
@rlaphoenix
rlaphoenix / ffmpeg-cheat-sheet.md
Created June 6, 2021 07:31
FFMPEG Cheat Sheet

FFMPEG Cheat Sheet

Troubleshooting

Re-encoding VFR content, but keeping VFR

Method 1: General Method

  • tl-dr; Discard timecodes from the video file, encode that video file, and then re-apply the original timecodes.
  • As long as the amount of frames that were encoded matches the original file and it's still synced the exact same