I'm currently running Raspbmc on my Raspberry Pi and activated UPnP streaming an rendering.
My goal is to write a simple Python to stream a video or music playlist.
I've tried Coherence, but I it's throwing a bunch exceptions and I don't really get the point as the documentation is pretty chaotic. So I'm looking for an easier way/library.
What's the easiest way to stream media files to my TV using Python?
DLNA uses UPnP for interconnectivity so that the DLNA-certified devices such as Blu-ray Disc™ players, TVs, computers, smartphones, and tablets can find each other and communicate. DLNA also uses UPnP to control different devices.
Digital Media Server is an open-source DLNA compatible UPnP AV Media Server. It is capable of sharing digital video, audio and image resources to UPnP AV and DLNA capable devices.
Share pictures and videosOpen an album and touch a picture or video. Your phone scans the Wi-Fi network for DLNA-compatible devices. Select your DLNA device. The picture or video appears on the connected device.
There is a lightweight pure python library dlnap which allows playing media on DLNA/UPnP devices in the same local network
You can use GUPnP binding for python through the gi.repository. Search the documentation for GUPnP and GSSDP, GUPnP AV.
You can couple them with something like a mini webserver running django+SQLite database to define a kind of content directory service (CDS) also you can use Gstreamer (a python binding exist called Gst). With those elements you can build a custom server using SSDP for the discovered stuff; from gstreamer you can get metadata about each media item, and can also use "rtspsrc" of gstreamer for streaming.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With