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.
stevem46_2001@reddit
This is quite fascinating and I'm very impressed! Well done!!
Fit-Breath5352@reddit
You should do Bad Apple next!
PureSwing9975@reddit (OP)
Sure! I did it actually on old versions (when i wasn’t working with colors yet) but now because of added complexity i’ll maybe have to add a grayscale option, working on it right now!
PureSwing9975@reddit (OP)
New code uploaded to the github repository, check it out
joeltrane@reddit
Amazing! I was expecting ASCII art not real video
DaromaDaroma@reddit
You took wrong video
You should go with b/w or grayscale and play "Bad Apple"!
Just kidding, good job.
Fluid_Classroom1439@reddit
Wow this is seriously impressive
Kelpsie@reddit
Wow, I was expecting something a lot closer to towel.blinkenlights.nl
dethb0y@reddit
that is pretty clever!
jaspy_cat@reddit
Very cool!
PureSwing9975@reddit (OP)
reddit being reddit, thanks for the people that still had the effort to click on it :)