I played a minute-long video in Windows Terminal

Posted by PureSwing9975@reddit | Python | View on Reddit | 11 comments

I recently worked on a project combining my love for terminal limits and video art. Here’s what I achieved: • Rendered a 1-minute-long (almost two) ASCII video in the terminal, without graphics libraries or external frameworks. • Used true 24-bit colors for each frame, offering deeper color representation in terminal-based projects. • Processed 432 million characters over 228 seconds, translating each frame’s pixels to colors. • Optimized performance with multi-processing, running on an integrated graphics card.

Specs:

•   30 FPS
•   160,000+ characters per frame
•   2,700 frames
•   3 characters per pixel for better fidelity

For further optimization, I reduced the font size to 3 pixels and used background colors to handle brightness.

What my project does?
While not the most practical project, it’s an experiment I’m satisfied with it. No real use, but hey, it’s fun!

Target audience
This is more of a fun project so I can't say it has a specific target audience, but I could say that people that strangely feels good coding "useless" things might like it.

Comparison
Well it is not an ASCII player anymore to be precise, but what it does now is just display video in the terminal using basically pure ANSI, I don't think there is an exact alternative to this since it doesn't serve a specific purpose, except from, well, displaying video with text, it is a fun project.

P.S. I’m considering rewriting the frame conversion in C to speed things up. More improvements are coming soon, and I plan to release the source code as soon as I fix some compatibility issues and error handling.

That’s it, you can watch a preview with Tank! from cowboy bebop (ignore some random color stripes i had to do some optimization but wasn’t really precise on difference calculation)

You can find the repo here but be aware that the current version was not pushed to github yet, but feel free to analyze the old versions/commits if you feel like, I will update when I release the current code.

OBS: changefontsize.py only works with windows terminal, as it changes the default font from your profile, will be removed in the current version as it degrades compatibility.