Skip to content
Simple python over the network media player to playback on DLNA/UPnP devices
Branch: master
Clone or download

Latest commit

cherezov Merge pull request #12 from joans321/master
support Ctrl+C exit program
Latest commit 08001ef Mar 12, 2018


Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE MIT licence added Nov 10, 2016 Update Jun 26, 2017


Enjoy music on your favorite sound system or share a picture or YouTube video with your folks and friends on smart TV. Simple network player for DLNA/UPnP devices allows you discover devices and playback media on them.


  • Python (whatever you like: python 2.7+ or python3)
  • youtube-dl to playback YouTube links


  • Fix '&' bug
  • Set next media
  • Volume control
  • Position control
  • Add support to play media from local machine, e.g --play /home/username/media/music.mp3 for py3
  • Try it on Windows
  • Add AVTransport:2 and further support
  • Play on multiple devices
  • Integrate local download proxy
  • Stop/Pause playback
  • Investigate if it possible to play images/video's on DLNA/UPnP powered TV (possible via download proxy)

Supported devices/software

  • Yamaha RX577
  • Samsung Smart TV (UE40ES5507) via proxy
  • Marantz MR611
  • Kodi
  • Volumio2 (?)
  • please email me if it works or doesn't work with your device


Overview [<selector>] [<command>] [<feature>]

--ip <device ip> ip address for faster access to the known device
--device <device name or part of the name> discover devices with this name as substring
--list default command. Lists discovered UPnP devices in the network
--play <url> set current url for play and start playback it. In case of empty url - continue playing recent media
--pause pause current playback
--stop stop current playback
--all flag to discover all upnp devices, not only devices with AVTransport ability
--proxy use sync local download proxy, default is ip of current machine
--proxy-port port for local download proxy, default is 8000
--timeout <seconds> discover timeout

Discover UPnP devices

List devices which are able to playback media only

Discovered devices:
 [a] Receiver rx577 @
 [a] Samsung TV @

List all available UPnP devices

> --all
Discovered devices:
 [x] ZyXEL Keenetic Giga @
 [a] Samsung TV @
 [x] Data @
 [a] Receiver rx577 @

[a] means that devices allows media playback
[x] means that device doesn't allow media playback

Playback media

Playback music

> --ip --play
Receiver rx577 @

Playback video

> --device tv --play
Samsung TV @

Show image

> --device tv --play
Samsung TV @

Local files

> --device tv --play ~/media/video.mp4 --proxy
Samsung TV @

YouTube links

> --device tv --play
Samsung TV @

Note: requires youtube-dl installed


Some devices doesn not able to play https links or links pointed outside of the local network.
For such cases tool allows to redirect such links to embeded download proxy.

The following command will set up a local http server at http://<your ip>:8000 and tells TV to download file from this http server:

> --device tv --play --proxy

So behind the scene the command looks like:

> --device tv --play 'http://<your ip>:8000/'

Note: proxy is syncronous which means that will not exit while device downloading file to playback.

We need to go deeper :octocat:

YouTube/Vimeo/etc videos
In general device can playback direct links to a video file or a stream url only.
There are tools to convert (YouTube) url to stream url, e.g youtube-dl tool.
Assuming you have download proxy up and running at http://<proxy ip>:8000 you can now play a video using command:

> --device tv --play http://<proxy ip>:8000/`youtube-dl -g`
Samsung TV @
You can’t perform that action at this time.