How to keep radio stream persistent during song changes (from Mpd to Mpd)?

Need help with MPD?
Post Reply
utanman
Posts: 12
Joined: January 21st, 2018, 11:48 pm

How to keep radio stream persistent during song changes (from Mpd to Mpd)?

Post by utanman » October 27th, 2019, 3:27 am

Hi

I have 2 Mpds running on 2 different Linux PCs. One is (ServerA) playing from a local music library. This one has .ogg http output. The other one (PlayerB) just has bunch of internat radio streams, and one of the entries in its playlist is the .ogg httpd from ServerA. I can listen ServerA ogg stream no problem, this works great in Aimp or FFplay. Also works in PlayerB but when I change song on ServerA, the PlayerB jumps to the next radio channel form its own playlist instead of waiting the new song from ServerA.

This must be possible to make so PlayerB does not jump to the next in the list, thinking that the stram has ended. However I can't figure out iff it is a ServerA thing or a PlayerB thing.

Aimp or Ffplay does not quit stream or playing when I change a song on ServerA. So I assume this is a setting somewhere in Mpd.


Here is the ServerA's http output

Code: Select all

audio_output {                                                                                                                                                                              
      type        "httpd"                                                                                                                                                                     
      name        "Ogg"                                                                                                                                                              
      encoder     "vorbis"                                                                                                                           
      port        "6501"                                                                                                                                                                      
      quality     "5.0"                                                                                                                 
      max_clients     "0"                                                                                                        
  }                       
Any recommendations?

thanks

max
Forum team
Posts: 953
Joined: January 15th, 2013, 3:43 pm

Re: How to keep radio stream persistent during song changes (from Mpd to Mpd)?

Post by max » October 27th, 2019, 11:54 am


utanman
Posts: 12
Joined: January 21st, 2018, 11:48 pm

Re: How to keep radio stream persistent during song changes (from Mpd to Mpd)?

Post by utanman » October 27th, 2019, 5:11 pm

Thanks, here is the mpd --version for both ends. Both of them are running on Debian bullseye/sid x64

PlayerB
https://paste.debian.net/hidden/23277e3c/

ServerA
https://paste.debian.net/hidden/c89b87af/

skidoo
Posts: 176
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Re: How to keep radio stream persistent during song changes (from Mpd to Mpd)?

Post by skidoo » October 28th, 2019, 4:06 pm

Just add

Code: Select all

always_on "yes"
to your httpd audio output.

utanman
Posts: 12
Joined: January 21st, 2018, 11:48 pm

Re: How to keep radio stream persistent during song changes (from Mpd to Mpd)?

Post by utanman » October 30th, 2019, 1:52 am

skidoo wrote:
October 28th, 2019, 4:06 pm
Just add

Code: Select all

always_on "yes"
to your httpd audio output.
Thanks I will give it a try.

utanman
Posts: 12
Joined: January 21st, 2018, 11:48 pm

Re: How to keep radio stream persistent during song changes (from Mpd to Mpd)?

Post by utanman » October 31st, 2019, 6:26 pm

skidoo wrote:
October 28th, 2019, 4:06 pm
Just add

Code: Select all

always_on "yes"
to your httpd audio output.
Hi

That did not help. I think this is really more about the MPD that is the PlayerB. Is there a way to make MPD stick to stream (which comes from ServerA) as long as possible before moving to the next track in its playlist?

What happens is that PlayerB jumps to the next song, when ServerA is changing the song to the next in its playlist. So it probably thinks that the stream is cut. But that is just a stream for PlayerA it does not know anything about the other side. However PlayerB never changes track wth other radio streams, so not sure.

utanman
Posts: 12
Joined: January 21st, 2018, 11:48 pm

Re: How to keep radio stream persistent during song changes (from Mpd to Mpd)?

Post by utanman » October 31st, 2019, 7:11 pm

I had a bit of progress. My problem is resolved if I change the encoder to "opus" from "vorbis". No jumps happen, however I am wondering if it is possible to achieve this with "vorbis" ?

Here is the new http output for ServerA, that seems to work for client MPD

audio_output {
type "httpd"
name "Http"
encoder "opus" # optional, vorbis or lame
port "6501"
quality "5.0" # do not define if bitrate is defined
max_clients "0" # optional 0=no limit
always_on "yes"
timeout "5"

}

Still not perfect it still jumps to next song once in a while, I guiess depending on the song on the playlist of ServerA, but is it possible to make it so that I never get jumps in PlayrB MPD.

Btw ServerA and Player are on the same WiFi network. Although happens to another MPD player running on the same machine that ServerA runs so not a networking issue it seems .

utanman
Posts: 12
Joined: January 21st, 2018, 11:48 pm

Re: How to keep radio stream persistent during song changes (from Mpd to Mpd)?

Post by utanman » October 31st, 2019, 7:41 pm

And another progress, it seems like if the track on ServerA changes from MP3 to FLAC (or FLAC to MP3), then PlayerB jumps to next track on its playlist rather than keeps waiting for the next song in ServerA stream url . Any thoughts?

max
Forum team
Posts: 953
Joined: January 15th, 2013, 3:43 pm

Re: How to keep radio stream persistent during song changes (from Mpd to Mpd)?

Post by max » October 31st, 2019, 9:56 pm

The link I posted asks you to show your log file(s). So I've been waiting for you for a few days to complete your data, but apparently you didn't understand that this is necessary.

Post Reply