Skip to content

Instantly share code, notes, and snippets.

View pixelcmtd's full-sized avatar
🖤

pixie pixelcmtd

🖤
View GitHub Profile
@pixelcmtd
pixelcmtd / ENCODING.md
Last active September 7, 2025 12:40
chrissx Media Video Encoding Guidelines

chrissx Media Video Encoding Guidelines v0.2α

© 2025-present chrissx Media, Pixel Häußler
Spreading the word is encouraged.

Over the last decade of video production, mostly on YouTube (chrissx Media et al), I have acquired a bit of knowledge about video encoding. The following document lays out a few guidelines for every step of the production process.

Unless you unironically use kdenlive (personal experiences make that hard to belive) or you have toroughly benchmarked your NLE's encoder, there is one simple truth: Never Master with your NLE's builtin encoder. Instead, edit in a modern NLE (Premiere, Resolve, etc.), "export" a huge Mezzanine file in a lightly compressed format and Master with FFmpeg. The following sections lay out guidelines for this workflow.

Table of Contents

@pixelcmtd
pixelcmtd / CMSFC.md
Last active July 15, 2023 06:12
Short Fastener Codes

chrissx Media Short Fastener Codes v0.4.0

A standard way to abbreviate common fasteners.

Fasteners

Format Example Description
A<Thread>[×<Length>][+<Thread Length>] AM5×25+7 Spacer
C[×] C#6-32×1" Countersunk Screw
@pixelcmtd
pixelcmtd / bigaudio.md
Last active July 25, 2025 18:56
Big audio interfaces (Focusrite Scarlett 18i8, Clarett (USB/+) 4Pre, 8Pre, ...) on Linux (PulseAudio)

Big audio interfaces (Focusrite Scarlett 18i8, Clarett (USB/+) 4Pre, 8Pre, ...) on Linux (pulseaudio)

When trying to use a "big" audio interface (i.e. one with many in- and outputs) on Linux, you might be experiencing problems like only some of your in- and outputs working, none working at all, etc. This is because, while PulseAudio works very well with commodity hardware, it just doesn't know your way too expensive interface. However, in a few minutes you can tell it how to deal with it.

#!/usr/bin/python3
# this is just a small script to brighten an image by 30%,
# which should probably be done in plain gimp, but idc
from PIL import Image
from sys import argv, exit
if len(argv) < 3:
print('usage: {} [input] [output]'.format(argv[0]))
#!/bin/sh
# this is an old script that tried to calc the cpu usage and doesnt work well
usagehz() {
cat /proc/stat | grep '^cpu ' | cut -d' ' -f5
}
time=$(date +%s%N)
USER_HZ=$(getconf CLK_TCK)
//This file is licensed under the BSD 3-clause license and based on i3/i3status.
#include <sys/sysinfo.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
static int prev_idle = 0, prev_total = 0;
int print_cpu_usage() {
@pixelcmtd
pixelcmtd / clib.cs
Last active October 5, 2018 22:28
Added file opening, closing and EOF checking.
/*
This is the source file of clib, a C# libc port.
This is used only by movc at the moment, which is not released yet.
This is licensed under the GNU GPLv3.
*/
using System;
using System.IO;
namespace clib
{