Close
0%
0%

growing mold in a cup of coffee leftovers

Specifically, streaming it to Twitch

Similar projects worth following
https://www.twitch.tv/crimier

One of our hackerspace members left a cup of coffee with some leftovers inside. This is not the first time he does this, and, after a couple of days, the cup is full of mold. Today, 3rd September 2017, I've made a box that holds the cup, has a camera and some lights inside, and streams image from camera to Twitch. Let's see just how quickly mold grows in the cup!

Zandis, you need to clean up your cups. Now your cup is being held hostage by this experiment, so you need to bring another one.

Our hackerspace: makeriga.org ; facebook.com/makeriga

Stream is done by a Raspberry Pi and Logitech C905 camera. The setup is simple - 9V wall-wart powers the LED strip pieces, which are glued on the top of an Ikea Pappis cardboard box. Camera is mounted on long thin wood sticks inserted through walls of the box and crossed in X shape, for stability, and the camera cable goes out of the box and into the Pi.

  • Streaming script

    Arya09/03/2017 at 14:56 0 comments

     INRES="1280x720" # input resolution
     OUTRES="640" # output resolution horizontal. vertical is calculated.
     FPS="7.75" # target FPS
     GOP="15.7" # i-frame interval, should be double of FPS,
     GOPMIN=$FPS # min i-frame interval, should be equal to fps,
     THREADS="2" # max 6
     CBR="1000k" # constant bitrate (should be between 1000k - 3000k)
     QUALITY="ultrafast"  # one of the many FFMPEG preset
    #Audio actually doesn't work, I don't know why, but it's supposedly there
     AUDIO_SRATE="44100" 
     AUDIO_CHANNELS="1" #1 for mono output, 2 for stereo
     AUDIO_ERATE="96k" #audio encoding rate
     STREAM_KEY="sorry_to_disappoint_you" #your twitch stream key goes here
     SERVER="live-waw" #  http://bashtech.net/twitch/ingest.php for list
    ffmpeg -y -f video4linux2 -s "1280x720" -r "$FPS" -i /dev/video0 -vcodec libx264 -g $GOP -keyint_min $GOPMIN -b:v $CBR -minrate $CBR -maxrate $CBR -vf "scale=$OUTRES:-1,format=yuv420p" -acodec libmp3lame -f flv -preset $QUALITY -bufsize "500k" "rtmp://$SERVER.twitch.tv/app/$STREAM_KEY"

    You can regulate camera parameters, like brightness, white balance and backlight compensation, in realtime (not interrupting the streaming pipeline) with v4l2-ctl, more on that here 

  • Technical decisions

    Arya09/03/2017 at 14:53 0 comments

    Why not have sound? First of all, it doesn't work in current setup for some reason. Second problem that the box is currently in the middle of our hackerspace's coworking room, and people expect some privacy there (in addition, not everybody that will come will know that there's a camera in that box on the desk, and it's streaming live).

    Why Raspberry Pi? Once you get the hang of it and get a working ffmpeg command-line, it's a perfectly suitable device to stream RTMP to places like Twitch, Youtube or Facebook. You need to not be afraid of console, of course - but if you aren't, you save a lot of power and can make a really maintainable solution.

    Why Logitech? It would be crazy not to use it, actually, their cameras are really high-quality while still being affordable, and the hardware supports various hardware encodings, has lots of parameters exposed for regulation, so it'd be stupid not to use a Logitech camera, from a technical standpoint.

    Oh, and the 9V wall-wart connection goes through a capacitor bank, basically, I split PCB material two lines of copper with a cutting disk, then soldered on all kinds of capacitors I could find in our hackerspace.

View all 2 project logs

Enjoy this project?

Share

Discussions

nideme6079 wrote 12/03/2021 at 09:37 point

Oh its amazing really to see it in a coffee cup you can check some very detailed nespresso capsules reviews here.

  Are you sure? yes | no

tsrubar wrote 09/08/2017 at 06:38 point

its like watching my collegues cup, i guess it can even walk sometimes :D

  Are you sure? yes | no

Richard Hogben wrote 09/05/2017 at 22:51 point

It's still going?

  Are you sure? yes | no

Arya wrote 09/06/2017 at 01:26 point

Right now, it is - our hackerspace had ISP problems (in fact, a lot of people in our city encountered them), but now it's clear, and I intend to stream for at least one more week =)

  Are you sure? yes | no

Richard Hogben wrote 09/07/2017 at 23:40 point

its getting really bad

  Are you sure? yes | no

Blecky wrote 09/05/2017 at 07:53 point

I hate this project, it's wasting my life!!!!!

  Are you sure? yes | no

Jarrett wrote 09/04/2017 at 17:30 point

Updates?!?!

  Are you sure? yes | no

Arya wrote 09/06/2017 at 01:26 point

Will write something sometime soon - I have quite a backlog of things to be done =)

  Are you sure? yes | no

Dr. Cockroach wrote 09/03/2017 at 23:31 point

So that is why my morning coffee has been getting  a funky look and taste to it ;-)

  Are you sure? yes | no

Arya wrote 09/04/2017 at 00:05 point

I swear, it's not me. You should ask Zandis.

  Are you sure? yes | no

Morning.Star wrote 09/03/2017 at 22:42 point

Ars hacks the post-it note. You sir, are an evil genius ;-)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates