- Install Pillow and PyGame
pip install pillow pygame
- Compressing the video
- Download this video
- Compress to 7FPS and 144p using
ffmpeg -i <input.file> -filter:v fps=7 -filter:v scale=144:-1 7fps.webm
- Extract frame data
- Make a directory named
imgs
- Run
ffmpeg -i 7fps.webm imgs/frame%04d.png
- Make a directory named
- Run the encoder
python encoder.py
- NOTE: if the encoder appears to be hanging or crashing during the "Sanity Check" phase, verify
FRAME_COUNT
andFRAME_PIX
constants are accurate for your video
- Compress the audio track enough to fit onto the disk
ffmpeg -i 7fps.webm -c:a libvorbis -ab 32k -ar 22050 -vn song.ogg
- NOTE: the file must be called "song.ogg", or the player program must be updated with the new name
- Run the player
python player.py