Pandora on TiVo

I’m an avid Pandora listener and upgraded to Pandora One. I’m also a TiVo owner as well. I was a little disappointed when I found out Pandora isn’t available on TiVo yet.

I have a server running pyTivo to stream my music and photos to my TiVo. I wanted to listen to my Pandora account on my TiVo and not wait for TiVo to do it. My plan is to use the TiVo HME SDK to write my own app, but in the short term I did the poor mans version.

My server is headless, so I’m running a command-line Pandora client called pianobar. While it plays the audio, I wanted to know how to stream it via HTTP instead of the speakers. I found that you can use gstreamer to tap into the pulseaudio monitor. WIth gstreamer I can take the PCM audio, convert it to mp3 and send it to the icecast server.

In order to do this, you need to find out the pulseaudio monitor device. I typically run:

pactl list > /tmp/output

Then I look for the Sink with a State: of RUNNING. Then grab the Monitor Source:. Once you have the monitor source, you can use gstreamer to do the rest.

gst-launch pulsesrc device=MONITORSOURCEVALUE ! audioconvert ! lame name=enc mode=0 vbr-quality=6 ! shout2send mount=/pandora.mp3 port=8000 password=hackme ip=

Last step is to create an .m3u file to put in your music folder configured in pyTivo. Mine is simply one line:

Now in your TiVo menu, select “Music & Photos”, select MyMusic (or what ever you called your music share in pyTivo). Find the .m3u file, and select the url that’s inside. Sit back and listen to your Pandora stream on your TiVo.