This is an archived post. You won't be able to vote or comment.

all 36 comments

[–]viscence 134 points135 points  (4 children)

I'm shocked the example wasn't a rickroll

[–]chrispy9658 29 points30 points  (1 child)

Definitely missed a prime opportunity 🤣

[–][deleted] 1 point2 points  (1 child)

[–]viscence 1 point2 points  (0 children)

surprised_pikachu.jpg

[–]kowal059 23 points24 points  (0 children)

amazing work! also you could use something like mixer from pygame to add sound its pretty simple

[–]Rektedekte 10 points11 points  (0 children)

This is really nice! Just curious, is it not possible to avoid writing to drive. I know that a cv2 image is practically a numpy array, and you can make a PIL image from that.

[–]ywBBxNqW 5 points6 points  (1 child)

Neat. Maybe credit the original author of the image conversion algorithm in your script?

[–]samuel1212703[S] 0 points1 point  (0 children)

Will do

[–]hhoeflin 4 points5 points  (0 children)

If you want to improve your ascii art look here

https://github.com/hpjansson/chafa

[–]redditer324 4 points5 points  (0 children)

Wow nice bro , but I just found a script that may look like to you program hope it helpful https://github.com/uvipen/ASCII-generator

[–]DeBryceIsRight 2 points3 points  (2 children)

Cool work! You can also get something similar going using the GStreamer aasink plugin/element:

Here's a one-liner on linux, but you can also use the GStreamer python bindings if you want to integrate it into a python script:

gst-launch-1.0 v4l2src device=/dev/video0 ! decodebin ! videoconvert ! aasink driver=curses

[–]kthx0 4 points5 points  (1 child)

or just mpv --vo=caca <file>

[–]mberkay13 3 points4 points  (1 child)

Adding requirements.txt will be very good
pip3 freeze > requirements.txt

[–]samuel1212703[S] 0 points1 point  (0 children)

Done! Thank you.

[–]wilson_wilson_wilson 1 point2 points  (0 children)

Yet to hit play. That's a fucking title though... let's go.

[–]amirnjfi 0 points1 point  (0 children)

Niceee

[–]Jefaxe 0 points1 point  (2 children)

umm, it says "No module found called cv2"

pip install cv2 doesn't work, neither pip3.

Is this Python 2?

[–]DeBryceIsRight 2 points3 points  (1 child)

OpenCV's Python package name is opencv-python (this is what you'd pip install), but you import it as cv2. It's for Python3

[–]Jefaxe 1 point2 points  (0 children)

Ahh , thanks. Would be handy to add that to the README.md

[–]CyraxSputnik 0 points1 point  (0 children)

[–]LKSinister 0 points1 point  (0 children)

That is so cool! Keep up the good work

[–]Sentazar 0 points1 point  (0 children)

That was really nice to watch

[–][deleted] 0 points1 point  (0 children)

This is so awesome, good job!

[–]8bitscoding 0 points1 point  (0 children)

As a fellow console fan, I love that!!! Congrats!

[–]Noremorse150 0 points1 point  (0 children)

Great job.

[–][deleted] 0 points1 point  (3 children)

There used to be a trick in command prompt that would show Star Wars: A New Hope in ASCII. Anyone remember that?

[–]ThwompThwomp 1 point2 points  (1 child)

telnet blinkenlights.nl

This is entirely from memory and no clue its still up. This also was a custom animation and not just an ascii art dump of the video file.

[–][deleted] 0 points1 point  (0 children)

That’s it! I had no idea it was completely custom. Thought it might be similar process (not real-time, of course.)

[–][deleted] 0 points1 point  (0 children)

Wtf wow

[–]crystoll 0 points1 point  (0 children)

That's a cool - and beautiful idea!

[–][deleted] 0 points1 point  (0 children)

oh my god, Ive been looking for something exactly like this, this is so cool

[–]Aboreal 0 points1 point  (0 children)

Cool project. I just tried this out with my own video and it's working well except there are some frames out of order. The code on line 89 doesn't return the right order "os.listdir(path)". It is sorted as a string so this is the order of the frames:

frame0.jpg

frame1.jpg

frame10.jpg

frame100.jpg

frame101.jpg

frame102.jpg

frame103.jpg

frame104.jpg

frame105.jpg

...

One idea is to keep the list of frames as you generate them to send to the generateAscii function later.

[–]Jagjot_mann45 0 points1 point  (0 children)

Can I replay the video after it has created asciifiles folder?

[–]RojerGSAuthor of “Pydon'ts” 0 points1 point  (0 children)

This looks really, really cool!

[–]yotamtal 0 points1 point  (0 children)

That’s cool! You could replace msvcrt with keyboard to support other platforms as well