[HN Gopher] Matrix-webcam displays your webcam video feed in the...
       ___________________________________________________________________
        
       Matrix-webcam displays your webcam video feed in the console
        
       Author : joschuck
       Score  : 233 points
       Date   : 2022-10-02 17:39 UTC (5 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | isoprophlex wrote:
       | NICE! and way cooler than what I did; i too went the python - obs
       | - virtual device route, but to have my randomly hued face
       | pingpong around the screen like the dvd logo screensaver
       | 
       | Very cool stuff!!
        
         | codetrotter wrote:
         | That sounds like fun too! Did you put it on GitHub yet? And if
         | not, then please do :)
        
       | basilgohar wrote:
       | Ah, I see, webcam selection is not available, so it pulls-up my
       | laptop's in-built one (I think) and not the one I have connected
       | on top of my monitor, so I just see some noise from the closed
       | laptop. Looks fun, though.
        
         | seiferteric wrote:
         | https://github.com/joschuck/matrix-webcam/blob/main/matrix_w...
         | 
         | Looks like a one line change, change 0 to 1.
        
         | joschuck wrote:
         | oh it's even on the todo. Let me add that in a bit
        
           | joschuck wrote:
           | Shoul be available now pip install matrix-webcam --upgrade
           | and the matrix-webcam -d 0[1,2,3,...]
        
       | tapoxi wrote:
       | Wow the setup for Linux seems to be painfully more complicated
       | than macOS/Windows. Why is that the case?
        
         | laumars wrote:
         | You can follow the same steps in Linux as you did for macOS too
         | (OBS is also available for Linux, in fact that how I personally
         | run OBS).
         | 
         | The reason the Linux instructions are more verbose is because
         | Linux also supports writing directly to a virtual camera via
         | the command line. Something that's not so easy to do with
         | macOS. So you can save yourself a lot of lag and system
         | resources by doing so rather than using OBS.
        
         | insulfrable wrote:
         | ... he asks, rhetorically.
        
           | juunpp wrote:
           | And leaves satisfied after dropping his own grain of
           | corporate propaganda. A most fruitful day.
        
         | joschuck wrote:
        
         | marginalia_nu wrote:
         | Yeah for whatever reason webcam tooling on Linux is really
         | dismal.
        
       | metadat wrote:
       | Direct link to what this looks like:
       | 
       | https://raw.githubusercontent.com/joschuck/matrix-webcam/mai...
        
       | InvaderFizz wrote:
       | Looks like a fun tool. On macOS, it always does an 80x24 display,
       | no matter the actual size of the display. This make is low enough
       | resolution that nothing really useful is resolvable. Tput has no
       | issue determining the console size.
        
         | boston_clone wrote:
         | You might be able to refactor line 76 in __main__.py to use
         | larger values than the default terminal window size? caveat
         | emptor and all, since I haven't tried this myself.
         | 
         | https://docs.oracle.com/cd/E36784_01/html/E36880/initscr-3cu...
         | 
         | https://docs.oracle.com/cd/E36784_01/html/E36880/getmaxyx-3c...
        
       | andirk wrote:
       | At my work, I'm making a media player to rule them all, including
       | with live streaming via WebRTC. I only work on the front-end
       | portion but Javascript and the browser now need absolutely no
       | extras to perform live streams.
        
       | renewiltord wrote:
       | mplayer with aalib worked surprisingly well for video playback
       | this way back in the day
        
       | dhosek wrote:
       | Not clear--can I use this for my outgoing feed so that people
       | will see me as an undulating collection of monochrome characters
       | in the conference?
        
         | nonoesp wrote:
         | The README says you can pipe this "matrix feed" to Zoom by
         | using OBS Studio's Virtual Camera feature. I've used this
         | virtual camera on Zoom meetings before and, especially on
         | macOS, it can be laggy.
        
           | EamonnMR wrote:
           | Laggy might add a tasteful zest of glitchyness.
        
             | tomjakubowski wrote:
             | I need a gstreamer pipeline which gives video feeds a "Tom
             | Goes to the Mayor" effect, and then something to hook that
             | into Zoom. Then I'll actually be able to focus when I'm on
             | a video call.
        
         | joschuck wrote:
         | exactly, see the README on how to do it. I am not taking
         | responsibility if you do it with HR though
        
       | walrus01 wrote:
       | For anyone who wants to play a whole movie matrix-style, with
       | audio, you can use aalib with vlc as a video output:
       | 
       | https://www.google.com/search?client=firefox-b-d&q=aalib+vlc
        
       | juunpp wrote:
       | It's impressive you can do this in 200-odd lines of Python. How
       | much CPU juice does that SelfieSegmentation drink?
        
         | joschuck wrote:
         | It uses mediapipes selfie segmentation module:
         | https://google.github.io/mediapipe/solutions/selfie_segmenta...
         | using MobileNet v3 (around 0.5 GFlops of juice it's gurgling,
         | so enough to run on a raspberry, maybe not your Casio)
        
           | juunpp wrote:
           | It'd be interesting if this could be embedded in the
           | client/server, e.g. Jitsi. At work we turn off cameras to
           | save bandwidth, but this seems like you could just send a
           | bitstring, and heavily compressed at that.
        
             | joschuck wrote:
             | Actually that reminds me of - and i personally think it's
             | the future of video compression - that there a neural
             | network based codecs in the making
             | https://developer.nvidia.com/ai-video-compression
        
             | joschuck wrote:
             | Yeah would be fun if you could gzip/compress let's say 4
             | frames every 200ms and make your own ascii video stream
             | codec so to speak
        
       ___________________________________________________________________
       (page generated 2022-10-02 23:00 UTC)