How to push DLNA content from the command line
Asked Answered
P

2

7

I am going to integrate broadcasted channels with IPTV channels into one menu on my TVs. The problem is that swithing between different sources is a pain. So basically I need to create a menu on the tv to select the channel I want to watch and then switch the TV to that very channel. I know how to create the menu.

The other part of the solution is to push the ITPV channel from the mediaserver to the TV screen. This is a hard part. I ended up installing gupnp and playing with it. It works and I'll be able to write the application.

May be you have an idea of a better solution to pushing the content via DLNA? Is there a command line utility or a mediaserver that can be controlled from the command line? That'll be an ideal option.

The very basic question is how would you programmatically play a resource from a mediaserver on a renderer?

Thanks.

Pollerd answered 13/2, 2013 at 11:11 Comment(0)
M
4

This shows how you can instruct your renderer to play media from a mediaServer, using curl from the command line. You can easily make a similar http request from within a program.

http://www.accella.net/knowledgebase/sending-a-video-content-to-a-dlnaupnp-softwaredevice-using-curl/

and this too: http://djoepnpoep.blogspot.co.za/2015/07/command-line-dlnaupnp-av-with-curl.html

Manicure answered 2/1, 2016 at 18:51 Comment(0)
L
3

The very basic question is how would you programmatically play a resource from a mediaserver on a renderer

The very basic answer is, you can't. UPnP MediaServer in itself is not designed for ability to start playing content to a renderer, exactly the same way as a HTTP server can't start displaying HTML on a particular browser window without the browser making at least one request first. So you have two options:

  1. your implementation of "the menu in TV" (whatever that is) is capable of UPnP discovery and browse the mediaserver for the wanted content (perhaps on hardcoded URL to simplify).
  2. introduce an UPnP Control Point into your network, which knows how to discover and browse the mediaserver and push the content into a selected Renderer. I don't see any reason why that shouldn't be possible to do from commandline, gUPnP seems to provide a source for sufficiently powerful Control Point which you can tweak and tailor to your needs.

Mind that both options effectively result in your TV making a request on MediaServer and actively downloading the stream data. There is no hidden wizardry in the second option, "push" practically means that the Control Point tells the renderer "here is the URL which you start downloading".

Lustrous answered 18/2, 2013 at 14:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.