Tag search

Streaming audio over TCP with python-gstreamer

by Sander Marechal

I've fallen in love with Python. I'm always on the lookout for a good excuse to learn a new programming language. So, when I wanted something that lets me play my music collection from my server to my stereo I took python for a good test drive. Anoher thing I wanted an excuse for was learning gstreamer, so naturally I picked python-gstreamer.

Sadly there's a huge lack of documentation for it.There are only a few good tutorials around, first and foremost Jona Bacon's excellent tutorials [1][2][3]. I wanted my hack to work over TCP as well, because I have multiple music libraries. One on my home server, one on my desktop, a bit more on my laptop, etcetera. I want to be able to stream from other machines to my server which I'll hook up to my stereo. I could not find any tutorials on using tcpserversource and tcpclientsink elements, so honoring Jona's request that everyone “should write an article about something that you have discovered that isn’t particularly well documented”, here's mine about tcpserversource and tcpclientsink.