Background:
I'm pretty familiar with DLNA servers from an end-user's perspective (on Linux at least). I've played around with PS3 Media Server, TVersity, Serviio, Plex, minidlna and mediatomb. All seem to basically provide a UPNP discoverable file system for DLNA compatible (?) clients:
- I've looked at how PS3 Media Server and Serviio do (pretty much) on-the-fly transcoding using FFMpeg and/or Mencoder.
- I've looked at how to fudge details in video container formats to achieve "live" streaming via DLNA per Michael Fötsch's blog.
- I've got streaming of various IPTV channels working on Serviio with recent rtmpdump-based improvements in librtmp (here librtmp does lots of work to authenticate and download the rt[ms]p(e) stream, and FFMpeg does transcoding; I'm not sure if the live-streaming via DLNA part works the same way as the blog above.
I've also used a view different Android apps that allow you to play some well known stream (e.g: Youtube, Dailymotion, etc) to compatible TVs (e.g: PlayTo Roku/Chromecast/DLNA TV, Play To Universal and Twonky Beam).
Finally, I've also used specific apps (i.e: Youtube) on my Samsung SmartTV which allow "pairing" of the TV with some website such that you can stream some video to the TV on demand (i.e mid-playback) without the TV being in the related app (Youtube in this case).
Questions:
Could someone help clarify what's going on in the 'play to tv' and 'pairing' cases? Are these both uses/implementations of DLNA? If not, what are these apps actually doing?
I should explain that my eventual goal is to write something which runs on my Linux PC which streams arbitrary online video streams to my TV on demand. Something like:
- User browses to ANY site on tablet/smartphone via HTTP proxy on local subnet.
- Proxy re-writes HTML such that known or familiarly structured streaming sites have "Play to TV" link, which when clicked sends relevant information to a local web-server.
- Local web-server organises to start downloading the stream, transcoding as appropriate via FFMpeg.
- <insert magic here> to play to TV.
I think I understand how to approach steps 1-3 with the tools available (and with reference to the Serviio code), but I don't even know where to begin with step 4 because I don't know how those Android/TV apps do what they do :-).
Any help clarifying the concepts, or pointers to documentation, or relevant source-code all would be much appreciated.