Re: [Musicpd-dev-team] persistent streaming to icecast
The silent fallback stream solution described http://mpd.wikia.com/wiki/Icecast2 is not sufficient? Q On 01/27/2010 11:40 AM, Max Arnold wrote: Hello, folks I've already asked this question on the forum [1], but both solutions are not optimal. Is it possible to make streams between mpd and icecast persistent? I.e. even when player paused or stopped, can it generate null samples with specified bitrate to keep clients connected? The only time when it can stop feeding to icecast is when corresponding output get disabled. I do some programmatic playlist rotation and when particular playlist is finished (and before next one will be loaded), player goes to stop state and drops connection to icecast, forcing all listeners to disconnect. Capturing output from hardware soundcard is not an option anymore (I moved my setup to hosted server and plus I need to run several mpd instances), and liquidsoap eats too much processing power with unnecessary transcoding. Also I tried pulseaudio, gstreamer and jack by using them as intermediate layer and found no way to solve this problem. They all stop their output as soon as input is gone. [1] http://www.musicpd.org/forum/index.php?topic=2013.0 -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] persistent streaming to icecast
On Wed, 27 Jan 2010 17:40:58 +0700, Max Arnold lwa...@gmail.com wrote: I do some programmatic playlist rotation and when particular playlist is finished (and before next one will be loaded), player goes to stop state and drops connection to icecast, forcing all listeners to disconnect. I don't think you're going to get what you want anytime soon. Maybe you could try setting up a playlist that contains tracks of silence and switching to that. You need to make sure MPD never stops playing. Cheers, Tim. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] persistent streaming to icecast
To be clear, all I'm trying to say here is that there's significant motivation to implement a feature like this someday, since it'd help mpd better perform certain roles, some of which (multiple users controlling) are unique to mpd. I don't think you're going to get what you want anytime soon. Maybe you could try setting up a playlist that contains tracks of silence and switching to that. You need to make sure MPD never stops playing. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] persistent streaming to icecast
It seems to me that while the silent output works, it'd be nice to not have to rely on it - in particular, it'd be great if the operator of MPD couldn't accidentally disconnect everyone. As a concrete example, I've already used httpd output + web client (+FTP) as a way to listen to music with friends online, letting everyone control the player. It's all too easy for a less technical friend to forget they're not supposed to click on that pause button (or even do it by accident!). Jeffrey On Wed, Jan 27, 2010 at 6:06 AM, Qball Cow qb...@qballcow.nl wrote: The silent fallback stream solution described http://mpd.wikia.com/wiki/Icecast2 is not sufficient? Q -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] persistent streaming to icecast
On Wed, Jan 27, 2010 at 11:44:58AM +, Tim Phipps wrote: I don't think you're going to get what you want anytime soon. Maybe you could try setting up a playlist that contains tracks of silence and switching to that. You need to make sure MPD never stops playing. How I'm supposed to detect when one playlist is finished and it is time to load next one? Tracks in playlist are played in random order (with looping disabled) and when mpd finishes it stops. My script immediately notices this, clears old playlist and queues new. Also I have scheduled playlists. At defined time my script does fadeout, remembers current position, clears playlist, optionally plays short transition jingle and launches scheduled playlist. When finished, it restores old playlist and track position with fadein effect. All this song juggling constantly drops connection to icecast server. To me most logical MPD behavior is to establish icecast connection upon daemon startup and drop it only if user disables this particular output. Another useful behaviour is to continue playback even if output (icecast server) is inaccessible, just discarding audio samples to /dev/null and trying to reconnect with defined interval (maybe even with exponential fallback). I'd be glad to implement this feature myself, but unfortunately I have no C programming skills and this low level audio/buffering/threading mechanics is too complex for me. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] persistent streaming to icecast
On 2010/01/27 11:40, Max Arnold lwa...@gmail.com wrote: I've already asked this question on the forum [1], but both solutions are not optimal. Is it possible to make streams between mpd and icecast persistent? I.e. even when player paused or stopped, can it generate null samples with specified bitrate to keep clients connected? The only time when it can stop feeding to icecast is when corresponding output get disabled. MPD already generates silence during pause (both shout and httpd). But for this special use case, we could think about implementing an always-on mode, which never disrupts streaming clients. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] persistent streaming to icecast
On Wed, 27 Jan 2010 22:52:51 +0700, Max Arnold lwa...@gmail.com wrote: How I'm supposed to detect when one playlist is finished and it is time to load next one? Tracks in playlist are played in random order (with looping disabled) and when mpd finishes it stops. My script immediately notices this, clears old playlist and queues new. Don't play them in random order. Randomize the playlist into a temporary file before giving it to MPD. Or you could use the shuffle command to make MPD randomize the order. Then your script should be able to tell when the last track is being played. At that point you can use the crop command to remove all the previous tracks from the playlist and do whatever you want to do next. Also I have scheduled playlists. At defined time my script does fadeout, remembers current position, clears playlist, optionally plays short transition jingle and launches scheduled playlist. When finished, it restores old playlist and track position with fadein effect. Don't clear the playlist, crop it so just one track remains then add in the jingles etc.. Hope this helps. Cheers, Tim. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team