Toggle Quick Contact Bar

Posts Tagged “Raspberry Pi”

Posted by Omer

09 Mar 2013 — No Comments

Posted in Uncategorized

Tagged:

Last September, I boarded a plane from Tel Aviv to New York to start a new big period in my life. I was about to begin studying at NYU’s Interactive Telecommunications Program, a master’s program in art and technology. The engine hum turned into a roar, gravity shifted to my back. My girlfriend held me tight and we were airborne. A month later, she took a flight back to Tel Aviv to finish her own degree in Architecture.

Being two busy students/artists makes it hard enough to see eachother, being 7 timezones away makes it impossible. When we’re together, we try as hard as we can to distract eachother. There’s always too much work, until someone has enough and sneaks something new onto the stereo. Then we dance.

Listening to music together is something as fundamental to us as touching eachother. There was no way around it, I had to find a way to do that again.

When I was visiting Tel Aviv a that winter, I saw how much things changed. Our apartment was now shared, our stuff heavily permuted, also – my raspberry pi finally arrived in the mail.

I took this opportunity to make a device that creates that shared space between us. I connected the Pi to the T-Amp in the room, installed raspbian, defined the proper port forwarding for communications outside the local network, and started installing some stuff.

I started by setting up shairport , an AirTunes server for her to use, using this tutorial by Eric Trouch . It worked pretty well, so I’m sharing my steps:
 

For the current version, you’ll need mplayer, ffmpeg and youtube-dl: sudo apt-get install ffmpeg mplayer youtube-dl

Create your script file. I call mine yt, so I typed sudo nano yt. This opens the nano text editor. Into it, paste the following piece of code:

mplayer -vo null -cookies -cookies-file /tmp/cookie.txt $(youtube-dl -g -f 34 –cookies /tmp/cookie.txt “$1”)

One line. That’s it. Now make it runnable:

sudo chmod +a+x yt

That’s what I did. And then, from an apartment in Williamsburg, I typed this to a computer in Tel Aviv:

./yt http://www.youtube.com/watch?v=FIPQVpw-zkk

A minute later I got a response.
Photo 22-02-2013 22 40 59
It works. We can make it through a few more weeks.