

Show HN: NCurses Terminal Webcam - CSDude
https://github.com/mustafaakin/terminal-webcam

======
chjj
MPlayer can also do this. Something like this should work as an example:

    
    
      $ mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -fps 15 -vo caca

~~~
pcmonk
For the record, that's not pure terminal (it opens up another window). This
project works even in a bare vterm. I'd love to see this work over ssh.

~~~
chjj
It will draw an X11 window if there is an X display. Unset DISPLAY and it will
render in the terminal: $ DISPLAY= mplayer ...

Updated command for clarity (might want to fullscreen your terminal with
this):

    
    
        $ DISPLAY= mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -fps 15 -vo caca

~~~
pcmonk
Sweet, I didn't realize that. Sadly, the result flashes on and off and is
essentially unusable for me (either in xterm or a TTY on Slackware64 14.0). I
can tell it's working, though.

This also seems to work over ssh, though, which is cool.

~~~
nitrogen
Add the -quiet option to mplayer.

~~~
pcmonk
That fixed it. Thanks.

------
b0z0
Interesting - I just made something exactly like this (screenshot looks
exactly the same):
[https://github.com/billyeh/termchat](https://github.com/billyeh/termchat)! I
even had to publish a Node package to do it (pixelr).

Except it's got a chat function with other users as well :)

------
techwizrd
It's still using the old OpenCV calls, so I did a quick port to OpenCV 2.
[https://github.com/techwizrd/terminal-
webcam](https://github.com/techwizrd/terminal-webcam)

------
mrucci
Cool. You can do it also with `vlc` and the `-V aa` (ascii) or `-V caca`
(colored ascii) video output in the console.

Can play any videos or stream the webcam:

    
    
        vlc -V aa file.avi
        vlc -V aa v4l2:///dev/video0

------
hardwaresofton
Please add encryption (on by default), sound, and hook this up to PGP so that
it can be skype for hackers (and I don't mean just crackers, I mean in the
most general sense)

Just in case it wasn't clear - I think this is awesome.

~~~
CSDude
Well, I was going to do it (2 years ago as you can see in repo), but somehow I
forgot. Now, I made NodeJS fork of it:
[https://github.com/mustafaakin/terminal-webcam-
chat](https://github.com/mustafaakin/terminal-webcam-chat) to turn it into a
chat

------
CSDude
If you want to get full performance, use xterm, gnome-terminal and others are
very slow. Colorful one uses only 6^3 colors but it looks nice:
[https://raw.githubusercontent.com/mustafaakin/terminal-
webca...](https://raw.githubusercontent.com/mustafaakin/terminal-
webcam/master/colorful.png) (It is currently night here mywebcam sucks on
night)

------
Taylorious
This is pretty awesome. I'm surprised that you can get such a detailed and
responsive image with just different characters. Very cool.

~~~
userbinator
YouTube did something like this a few years ago for April Fools. I think on a
modern Retina-level display it would look even more impressive due to the
higher resolution and smaller character-pixels.

Also reminds me of this:
[http://www.oldskool.org/pc/8088_Corruption](http://www.oldskool.org/pc/8088_Corruption)

~~~
mzs
Forget about retina displays, imagine on a VT340* in glorious sixels!

[https://github.com/saitoha/PySixel](https://github.com/saitoha/PySixel)

*Or even xterm compiled with sixels support ;)

------
paulannesley
See also:
[https://github.com/dhotson/txtcam](https://github.com/dhotson/txtcam)

------
a3n
The submitted program, and the mplayer incantations in the threads, are the
most delightful things I've seen all day.

------
dhotson
Neat! I made something similar for OSX:
[https://github.com/dhotson/txtcam](https://github.com/dhotson/txtcam) /
Screencast: [https://asciinema.org/a/7301](https://asciinema.org/a/7301)

I used halftone characters to do "dithering".

Someone forked and updated it to work with iTerm2's 24 bit colour support:
[https://s3.amazonaws.com/f.cl.ly/items/063S2A0b2b3w3T2Z3J0q/...](https://s3.amazonaws.com/f.cl.ly/items/063S2A0b2b3w3T2Z3J0q/Image%202013.11.25%2022%3A22%3A23.png)
.. not bad!

------
EnigmaCurry
OK, now how can I make this loopback such that this is what the people I'm
talking to on google hangouts sees?

EDIT: duh, hangouts has a "share window" feature .. this is awesome!

------
13throwaway
Forget looking at my ugly face, how do I watch movies in my terminal?

~~~
chjj
You're in luck:

    
    
      $ mplayer -vo caca my-movie.mp4

------
suprjami
This isn't mine, but it does a similar sort of thing in browser. It's actually
a port of libcaca to JavaScript using emscripten:

[http://experiments.coscolla.net/libcaca/](http://experiments.coscolla.net/libcaca/)

The author is this guy:
[https://github.com/kozko2001/libcaca.js](https://github.com/kozko2001/libcaca.js)

------
jsilence
See also hasciicam by Jaromil.
[https://github.com/jaromil/HasciiCam](https://github.com/jaromil/HasciiCam)

------
zachlatta
See also [https://github.com/zfogg/ascii-chat](https://github.com/zfogg/ascii-
chat)

------
cont4gious
great work!

i did one the runs on osx a couple years ago. might be broken now, haven't run
it in a while.

[https://github.com/helloandre/cam2ascii](https://github.com/helloandre/cam2ascii)

------
TazeTSchnitzel
Reminds me of AAlib and bb, the portable demo.

~~~
Argorak
To go up the stack a bit, it reminds me of TTYQuake. (original website gone :(
)

[http://ingles.homeunix.net/presos/quake/4/ttyscreen.html](http://ingles.homeunix.net/presos/quake/4/ttyscreen.html)

