Skip to content

space928/badapple-quadtree-encoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video Converter Notebook

This repo contains the code needed to convert a greyscale video to a quadtree-compressed video.

The video should be split into individual frames for processing. This can be done with ffmpeg:

ffmpeg -i ".\Touhou - Bad Apple.mp4" "media\badapple%04d.png"

The notebook saves the compressed frames as a pickled python object (a tuple of two numpy arrays: the animation (a 4-component 2d array of rectangle definitions (value, x, y, subdivision)), and the array of frame lengths (each frame uses a variable number of rectangles to represent it)).

This is inteneded to be used by the pySSV video playback demo here.