News for hackers. Stuff that matters.
Re:Show HN: NCurses Terminal Webcam by chjj on Wednesday April 23, 2014 @09:27PM (#7638021)
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
Re:Show HN: NCurses Terminal Webcam by pcmonk on Wednesday April 23, 2014 @11:34PM (#7638363)
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.
Re:Show HN: NCurses Terminal Webcam by chjj on Wednesday April 23, 2014 @11:45PM (#7638394)
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
Re:Show HN: NCurses Terminal Webcam by pcmonk on Thursday April 24, 2014 @12:37AM (#7638532)
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.

Re:Show HN: NCurses Terminal Webcam by nitrogen on Thursday April 24, 2014 @01:13AM (#7638610)
Add the -quiet option to mplayer.
Re:Show HN: NCurses Terminal Webcam by pcmonk on Thursday April 24, 2014 @01:22AM (#7638628)
That fixed it. Thanks.
Re:Show HN: NCurses Terminal Webcam by mpyne on Wednesday April 23, 2014 @11:58PM (#7638428)
I can confirm it works fine at a raw terminal, even on Linux TTY. You might have to unset DISPLAY as recommended in the other comment.

One big tip for that mode of mplayer, use the 'd' key to switch dithering modes. Keep switching until you get to Floyd-Steinberg for the best quality (IMHO).

Re:Show HN: NCurses Terminal Webcam by NAFV_P on Thursday April 24, 2014 @06:11AM (#7639211)
I've just given it a go, I look lush. I tried changing the width and height but it came out the same size, I think I will have to play around with it.
Re:Show HN: NCurses Terminal Webcam by b0z0 on Wednesday April 23, 2014 @10:27PM (#7638191)
Interesting - I just made something exactly like this (screenshot looks exactly the same): 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 :)

Re:Show HN: NCurses Terminal Webcam by techwizrd on Wednesday April 23, 2014 @10:07PM (#7638139)
It's still using the old OpenCV calls, so I did a quick port to OpenCV 2. https://github.com/techwizrd/terminal-webcam
Re:Show HN: NCurses Terminal Webcam by mrucci on Thursday April 24, 2014 @01:20AM (#7638625)
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
Re:Show HN: NCurses Terminal Webcam by hardwaresofton on Wednesday April 23, 2014 @08:59PM (#7637948)
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.

Re:Show HN: NCurses Terminal Webcam by CSDude on Wednesday April 23, 2014 @09:38PM (#7638056)
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 to turn it into a chat
Re:Show HN: NCurses Terminal Webcam by Crito on Thursday April 24, 2014 @12:07AM (#7638464)
Hack it up with existing software. Shunt the output across the network with ssh, perhaps into a shared tmux session. That takes care of text chat too. (Of course libcaca kills the tmux session, so you might have to drop the frame-rate or keep the tmux panes small).

If you want to keep it hacky and horrible, have each side also set up pulseaudio and use it's networking capabilities over ssh to make each others computers the sink for your microphones. Or use existing proper VoIP software, if you want to be practical and boring.

Re:Show HN: NCurses Terminal Webcam by CSDude on Wednesday April 23, 2014 @10:03PM (#7638124)
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... (It is currently night here mywebcam sucks on night)
Re:Show HN: NCurses Terminal Webcam by Taylorious on Wednesday April 23, 2014 @08:28PM (#7637856)
This is pretty awesome. I'm surprised that you can get such a detailed and responsive image with just different characters. Very cool.
Re:Show HN: NCurses Terminal Webcam by userbinator on Wednesday April 23, 2014 @08:56PM (#7637939)
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

Re:Show HN: NCurses Terminal Webcam by mzs on Wednesday April 23, 2014 @10:12PM (#7638158)
Forget about retina displays, imagine on a VT340* in glorious sixels!

https://github.com/saitoha/PySixel

*Or even xterm compiled with sixels support ;)

Re:Show HN: NCurses Terminal Webcam by paulannesley on Thursday April 24, 2014 @12:39AM (#7638535)
Re:Show HN: NCurses Terminal Webcam by a3n on Wednesday April 23, 2014 @09:42PM (#7638071)
The submitted program, and the mplayer incantations in the threads, are the most delightful things I've seen all day.
Re:Show HN: NCurses Terminal Webcam by dhotson on Thursday April 24, 2014 @08:36AM (#7639832)
Neat! I made something similar for OSX: https://github.com/dhotson/txtcam / Screencast: 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/... .. not bad!

Re:Show HN: NCurses Terminal Webcam by EnigmaCurry on Wednesday April 23, 2014 @11:50PM (#7638401)
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!

Re:Show HN: NCurses Terminal Webcam by 13throwaway on Wednesday April 23, 2014 @09:27PM (#7638022)
Forget looking at my ugly face, how do I watch movies in my terminal?
Re:Show HN: NCurses Terminal Webcam by chjj on Wednesday April 23, 2014 @09:29PM (#7638028)
You're in luck:

  $ mplayer -vo caca my-movie.mp4
Re:Show HN: NCurses Terminal Webcam by NAFV_P on Wednesday April 23, 2014 @10:09PM (#7638146)
> Forget looking at my ugly face, how do I watch movies in my terminal?

Everything looks beautiful when rendered in ASCII.

Re:Show HN: NCurses Terminal Webcam by broodbucket on Thursday April 24, 2014 @02:48AM (#7638826)
You can change VLC's output target to the terminal. From what I understand it's only written single-threaded so it lags horribly.
Re:Show HN: NCurses Terminal Webcam by suprjami on Thursday April 24, 2014 @06:22PM (#7643480)
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/

The author is this guy: https://github.com/kozko2001/libcaca.js

Re:Show HN: NCurses Terminal Webcam by jsilence on Thursday April 24, 2014 @12:08AM (#7638468)
See also hasciicam by Jaromil. https://github.com/jaromil/HasciiCam
Re:Show HN: NCurses Terminal Webcam by zachlatta on Thursday April 24, 2014 @05:39AM (#7639147)
Re:Show HN: NCurses Terminal Webcam by cont4gious on Wednesday April 23, 2014 @10:59PM (#7638291)
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

Re:Show HN: NCurses Terminal Webcam by TazeTSchnitzel on Thursday April 24, 2014 @03:01AM (#7638844)
Reminds me of AAlib and bb, the portable demo.
Re:Show HN: NCurses Terminal Webcam by Argorak on Thursday April 24, 2014 @04:55AM (#7639044)
To go up the stack a bit, it reminds me of TTYQuake. (original website gone :( )

http://ingles.homeunix.net/presos/quake/4/ttyscreen.html