An animation player for the Uxn virtual machine.
It displays 1 bpp animations stored with a custom made file format. Audio isn't supported.
This project started as an exercise for learning Uxntal and is still a work in progress.
Clips used by uxn-player follow the custom 1ba
file format (for 1-bit animation), described in ENCODING.md.
uxnasm player.tal player.rom
Use gif21ba.py
to generate the encoded file:
python gif21ba.py src-file encoded-file
The encoder converts color GIFs into grayscale, and uses ordered dithering with a 2x2 Bayer matrix to turn them into 1 bpp images. Custom threshold values for dithering can be specified with the -t/--thresholds
option.
For example, the command bellow uses the following threshold matrix:
python gif21ba.py -t 60 80 100 150 src-file encoded-file
To play the animation, pass it as an argument to player.rom
. Window size is set dynamically:
uxnemu player.rom encoded-file
Use Space to pause the video.
- Use transparency optimization to reduce file size
- Adjust playback speed (currently set to 30 fps)
- Rewrite encoder in uxntal
- Add support for 2 bpp frames
The code for this project is licensed under the terms of the GNU GPLv3 license.