Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Streaming media files via DLNA/UPnP

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?

like image 753
WhatIsName Avatar asked Mar 21 '13 13:03

WhatIsName


People also ask

Does DLNA require UPnP?

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.

What is a UPnP DLNA media server?

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.

How do I share files with DLNA?

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.


2 Answers

There is a lightweight pure python library dlnap which allows playing media on DLNA/UPnP devices in the same local network

like image 73
Pavel Cherezov Avatar answered Sep 21 '22 17:09

Pavel Cherezov


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.

like image 25
Narcisse Doudieu Siewe Avatar answered Sep 21 '22 17:09

Narcisse Doudieu Siewe