News for hackers. Stuff that matters.
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by getToTheChopin on Thursday August 29, 2024 @06:36AM (#41389334)
This tool turns videos into ASCII pixel art. You can use your webcam feed or upload a video, then use the controls to adjust the colors, resolution, text style, etc.

Github repo: https://github.com/collidingScopes/ascii

It's built with javascript / html canvas.

I'll be continuing to work on this, with the goal of improving performance (it can be laggy at high resolutions) and to also allow image input (turn an image into animated ASCII art).

Please let me know of any feedback or suggestions!

Re:Show HN: turn videos into ASCII art (open source, js+canvas) by she46BiOmUerPVj on Thursday August 29, 2024 @07:55AM (#41389872)
It's awesome. I used the image export, is there anyway to export to text with escape codes?
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by getToTheChopin on Thursday August 29, 2024 @10:06AM (#41390966)
Happy to hear it! That's a great suggestion -- I will add that feature. Probably a button that you can press in the GUI, which will then populate a text field at the bottom with the relevant chars / line breaks of that frame.
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by jraph on Thursday August 29, 2024 @07:10AM (#41389547)
This reminds me of libcaca [1], which anyone interested in this should check out. It's integrated in various tools, including ffmpeg, mpv, and of course VLC (Sam Hocevar, who wrote libcaca, was also a key VLC contributor at its beginnings).

The biggest difference I see (apart from the used programing language) is that libcaca outputs colored ascii art.

[1] https://en.wikipedia.org/wiki/Libcaca

Re:Show HN: turn videos into ASCII art (open source, js+canvas) by jiripospisil on Thursday August 29, 2024 @07:17AM (#41389603)
I was just about to say. With mpv, you can play videos as ASCII art just by doing mpv --vo=caca <file>. Just make sure your mpv is actually built with caca support (mpv --vo=help; Arch Linux's mpv is not, Fedora's is).
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by jgtrosh on Thursday August 29, 2024 @07:16AM (#41389599)
For uncolored (and generally simpler) ASCII art, see the older libaa
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by nachomg on Thursday August 29, 2024 @08:55AM (#41390320)
Haha, name made me chuckle.
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by earthWindFi on Thursday August 29, 2024 @06:42AM (#41389375)
This is really cool, thanks for sharing. I’m getting glitchy cyberpunk vibes from this.
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by louloulouhoo on Thursday August 29, 2024 @06:55AM (#41389455)
Nice and simple site. Well done for making this work on mobile!
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by spacebacon on Thursday August 29, 2024 @09:55AM (#41390870)
Glad you did this. I had a similar idea but never made time for it. Thanks.
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by getToTheChopin on Thursday August 29, 2024 @10:08AM (#41390988)
Thank you! It was fun making this. I think I'll try some other video manipulations now that I've got code for splitting videos into frames / reading pixel data from each frame.
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by spacebacon on Thursday August 29, 2024 @11:34AM (#41391880)
Maybe start to head into the direction of filters. Stuff that after effects can already do for video. Stay interested in this and keep improving. Great work.
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by getToTheChopin on Thursday August 29, 2024 @11:57AM (#41392167)
Thank you for the feedback and reassurance. Hoping I’ll have more progress to share soon!
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by dylanha on Thursday August 29, 2024 @11:31AM (#41391860)
I thought the point of ASCII art was that it could be exported into Notepad. is the website mainly for aesthetics/art as opposed to inserting diagrams into READMEs now?
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by getToTheChopin on Thursday August 29, 2024 @11:52AM (#41392118)
Yes this website is mainly for aesthetics and art. I will however add a feature that will generate the relevant chars / line breaks of a given still image, so that it can be exported to notepad.
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by Minor49er on Thursday August 29, 2024 @11:40AM (#41391985)
When would you expect to put a video of a diagram into a readme file?
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by seanthemon on Thursday August 29, 2024 @11:49AM (#41392082)
Any damn time I want, notepad is the next best thing to freedom that we have!
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by ruthmarx on Thursday August 29, 2024 @01:41PM (#41393351)
> I thought the point of ASCII art was that it could be exported into Notepad.

I don't think that's ever been the point of ASCII art. It's just art made with ASCII characters, that's it.

Re:Show HN: turn videos into ASCII art (open source, js+canvas) by pak9rabid on Thursday August 29, 2024 @11:40AM (#41391973)
Interesting, so like aalib for the browser?
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by getToTheChopin on Thursday August 29, 2024 @11:55AM (#41392148)
I hadn’t heard of AAlib before, but just read the wiki for it, and yes this is a similar tool but for the browser.

This makes it easy to create video ascii art from any computer or phone

Re:Show HN: turn videos into ASCII art (open source, js+canvas) by liam-hinzman on Thursday August 29, 2024 @12:49PM (#41392796)
Is there anything like this where it's only coloring the text and not the background of the font? Hoping to find something like ascii-gen [0,1] but for video

[0] https://github.com/seatedro/asciigen [1] https://x.com/seatedro/status/1828414268707946506

Re:Show HN: turn videos into ASCII art (open source, js+canvas) by getToTheChopin on Thursday August 29, 2024 @01:02PM (#41392948)
If I’m understanding correctly, you should be able to do that by unchecking “Bg Gradient” in the GUI menu.

Then change the font colors as you wish.

Re:Show HN: turn videos into ASCII art (open source, js+canvas) by liam-hinzman on Thursday August 29, 2024 @01:18PM (#41393092)
Amazing! I didn't notice the control panel earlier
Re:Show HN: turn videos into ASCII art (open source, js+canvas) by iaad on Thursday August 29, 2024 @06:24PM (#41395945)
There's a version of "Never Gonna Give You Up" in ASCII art. Which means if you can access a .bashrc or something similar, you can rick roll them in their terminal on startup.

Found it: https://github.com/keroserene/rickrollrc

Re:Show HN: turn videos into ASCII art (open source, js+canvas) by getToTheChopin on Thursday August 29, 2024 @06:34PM (#41396032)
I love that. You’re never safe from Mr. Astley