Wednesday, November 17, 2021

[SOLVED] Moving listeners from mountpoint /live to /autodj (ezstream) stops player

Issue

I've installed an Icecast server and Ezstream. I'm having problem moving the listeners of a /live.mp3 broadcast (from SAM broadcaster mp3 encoder) to another mountpoint called /autodj.mp3 that loops a playlist when the no broadcaster is online. When I press "move listeners from /live.mp3 to /autodj.mp3 the music on the player that is on /live.mp3 stops. I've tried many modification on the xml files but I can't locate the problem. I hope there is someone out here who has dealt with a similar problem.

My ezstream .xml is:

<ezstream>
   <url> http://xx.xxx.xxx.xxx:8000/autodj.mp3 </url>

  <sourcepassword>xxx</sourcepassword>
  <format>MP3</format>
  <filename>/home/mp3/p.txt</filename>

  <shuffle>1</shuffle>
  <stream_once>0</stream_once>

  <svrinfobitrate>128</svrinfobitrate>
  <svrinfochannels>2</svrinfochannels>
  <svrinfosamplerate>44100</svrinfosamplerate>
  <svrinfopublic>0</svrinfopublic>
</ezstream>

And my mount configuration on icecast.xml

<mount>
   <mount-name>/live.mp3</mount-name>
   <password>XXX</password>
   <max-listeners>100</max-listeners>

   <fallback-mount>/autodj.mp3</fallback-mount>
   <fallback-override>1</fallback-override>
   <fallback-when-full>1</fallback-when-full>

   <public>1</public>
   <stream-url>http://xx.xxx.xxx.xx:8000/auto.mp3</stream-url>

   <bitrate>96</bitrate>
   <type>application/mp3</type>
   <subtype>mp3</subtype>
   <mp3-metadata-interval>4096</mp3-metadata-interval>

</mount>

<mount>

   <mount-name>/autodj.mp3</mount-name>
   <password>xxx</password>
   <max-listeners>100</max-listeners>

   <public>1</public>
   <stream-url>http://xx.xxx.xxx.xx:8000/autodj.mp3</stream-url>
   <bitrate>128</bitrate>
   <type>application/mp3</type>
   <subtype>mp3</subtype>
   <mp3-metadata-interval>4096</mp3-metadata-interval>

</mount>

If forgot to mention that also the "fallback" from /live.mp3 to /autodj.mp3 doesn't work either. I'm new to Icecast, so be gentle if I have made a begginer's mistake.


Solution

After week I found out that SAM Broadcaster was having different encoder than the ezstream. So I downloaded and installed LAME encoder on Sam and my server. Then I installed madplay on the server for decoding. Finally added this lines on my ezstream xml:

<reencode>
   <enable>1</enable>

   <encdec>

     <format>MP3</format>
     <match>.mp3</match>

     <decode>madplay -b 16 -R 44100 -S -o raw:- "@T@"</decode>
     <encode>lame --preset cbr 128 -r -s 44.1 --bitwidth 16 - -</encode>

   </encdec>
</reencode>


Answered By - Γιώργος Χατζηθανάσης