Hi list,
I just post some comments and thoughts I exchanged with Addrej about streaming the output of a SqueezeBox Server (or Logitech Media Server, see http://wiki.slimdevices.com) to a DLNA client (e.g. cheap headless DMR). As I like the LMS and its features like Web GUI and iPhone/Android controller software all my findings are specific to this server and not really rygel related. My first approach was to route the ALSA output from a SqueezeBos software player (squeezelite) via PulseAudio and rygel to the DLNA client. To be honest I did not come very far, but I at least found a way to possibly make it work with LMS. However, for this solution I don't need rygel... - LMS offers "Remote Streaming": Whenever a client connects to http://<lms-server-ip>:9000/stream.mp3 a web-player is instatiated in the server and it is possible to play files from the library as for any other squeezebox player connected to the server. With a DMC it is possible to start the stream on a DMR. When no file is playing there is "silence" in the stream that also fills the client side buffer, otherwise the complete playlist is fed into the stream. Thus the reaction of the client on a button press (play, pause, skip etc) is delayed. For a simple mplayer or vlc on linux this delay is around 70 seconds. For other clients this could be much longer! - For each software or hardware player that registers with the server the LMS creates a stream of the actual played file that is accessible via the address http://<lms-server-ip>:9000/stream.mp3?player=<player-mac-address> . As soon as the file ends also the stream interrupts and opens again for the next song. That means player like mplayer stops as the file ends. As soon as the software or hardware player disconnects from the server the stream also stops. Finding out these thins I realised that I don't need rygel anymore, as the stream is already created by the LMS itself and I only need to find a way to start the stream on the DMR. First thing I did was to create a "External Link" object on a MediaTomb DLNA server that had the address of the LMS stream, the object type "object.item.audioItem.musicTrack" and mimetype "audio/mpeg". Now I could browse the MediaTomb server on my DMR (e.g. my smart TV) and select this container item to start the stream. If no song was playing when connecting to the stream the DMR started to cache silence and on my TV I never waited so long to find out how much seconds the cachesize is. However I could select a song to play in the web gui of the LMS and restart playing the container item on the DMR and the song was played on the TV!. However as the caching is much faster than the realtime the play marker was already half through the playlist and pressing pause or skip had no direct effect. To automate the start of the stream on the DMR I searched the web and found a nice little perl script named "start_tvshow.pl" (https://github.com/amgorb/simple-DLNA-remote-controller/blob/master/start_tvshow.pl) that does exactly that: it searches the network for media server and media renderer, searches the media server for a certain file and start playing this file on the found DMRs. I think with this littel script, some perl knowledge and some knowledge about the LMS (also written in perl) it should be possible to implement a plugin for the LMS that searches the local network for DLNA clients, instatiates a squeezebox player to have the nice gui and send the player commands like play, pause, skip, volume etc. as UPnP commands to the DLNA client. But the discussion about this plugin should not be on this list but in the squeezebox forum at http://forums.slimdevices.com/. Bye, Helge. Am 14.03.2013 07:46, schrieb Andrej Falout:
|