Skip to content

Instantly share code, notes, and snippets.

@leesei
leesei / view-yuv.py
Created December 16, 2013 06:35
#python #view-yuv Load YUV file and render it using Pygame
#!/usr/bin/env python
import argparse
import os
import pygame
from pygame.locals import *
import sys
# constants
supported_formats = ('yv12', 'iyuv', 'i420', 'nv12', 'nv21')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NeuroWinter
NeuroWinter / ffmpeg cheatsheet for glitching
Last active September 8, 2025 12:39
ffmpeg cheatsheet for glitching
FFMPEG '-i', file, '-c:v', 'libopenjpeg', "jpeg2000\\" + name + ".jp2"\
Convert image to jpeg2000
ffmpeg -i in.png -c:v libopenjpeg out.jp2
Hex Edit out.jp2
ffmpeg -i in.jp2 -c:v png out.png
General Edit
ffmpeg -i input.avi -c:v mpeg2video -g 999 -q:v 1 output.avi
*edit in avidemux/whatever*