[Icecast] Pathing syntax for icecast.xml in Windows

Jack Elliott 541 848 7021 thatjackelliott at kpov.org
Mon Jun 1 15:42:49 PDT 2015


Marvin,

I'm back. And it works. If the live stream client stops, then the 
fallback file starts playing, on endless loop. If the stream client 
comes back up, the listener is returned to the live stream. IOW -- it 
works as advertised.

Here's what I have in my icecast.xml:

   <mount type="normal">
         <mount-name>/stream</mount-name>
         <max-listeners>3</max-listeners>
         <burst-size>65536</burst-size>
<fallback-mount>/400Hz_192kbps.mp3</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
   <!-- <username>othersource</username>
         <password>hackmemore</password>
<dump-file>/tmp/dump-example1.ogg</dump-file>
         <intro>/example_intro.ogg</intro>
         <hidden>1</hidden>
         <public>1</public>
         <authentication type="htpasswd">
                 <option name="filename" value="myauth"/>
                 <option name="allow_duplicate_users" value="0"/>
         </authentication>
         <http-headers>
<header name="Access-Control-Allow-Origin"
             value="http://webplayer.example.org" />
     <header name="baz" value="quux" />
         </http-headers>   -->
     </mount>

My static fallback file is an mp3 containing just a 400Hz sine wave at 
0dBFS for the purpose of calibrating the signal path right now. It will 
be replaced with appropriate music and announcements to cover for the 
event of a down stream. The file has to be, as is described elsewhere in 
the Icecast documentation, the same bitrate and format (stereo, in my 
case) as the live mount.

Thanks for the help!

-- 
that Jack Elliott
541 848 7021
Producer Wednesday Point, Host, The Sunday Classics
KPOV 88.9, High Desert Radio
Audio geek

On 06/01/2015 08:52 AM, Marvin Scholz wrote:
> On 1 Jun 2015, at 17:39, Jack Elliott 541 848 7021 wrote:
>
>> Marvin,
>>
>> Ah, thank you for clarifying where "webroot" is.
>>
>> The application here will be a non-public stream with one listener
>> client. Icecast is hosted on a computer at our radio station. It will
>> receive a stream from a stream client at a remote live music event.
>> There will be one listener: a media player running on another computer
>> on the network at the station which will send the audio to the FM
>> transmitter.
>>
>> The intial setup works fine just doing the minimum suggested
>> modifications to icecast.xml: change passwords and usernames, and give
>> mountpoint a unique name. This is all toward the top of the config
>> file.
>>
>> There is a large section toward the bottom of the config file where
>> one
>> defines normal mounts and suchlike. It comes commented out and I've
>> left
>> it that way since so far the setup is working.
>>
>> To add a fallback, I read here (http://mpd.wikia.com/wiki/Icecast2)
>> that
>> all I really need to do at this point is uncomment out the following
>> in
>> the config file:
>>
>> <mount>
>> <mount-name>/MountnameSameAsStaticFilename.mp3</mount-name>
>> <fallback-mount/MountnameSameAsStaticFilename.mp3</fallback-mount>
>> <fallback-override>1</fallback-override>
>> </mount>
> As far as I know what you have to do is, define a mount section for your
> stream:
>
> <mount>
> 	<mount-name>/mystream.mp3</mount-name>
> 	<fallback-mount>/fallback.mp3</fallback-mount>
> </mount>
>
> I don't think that the fallback would need a config to just fallback to
> itself, this makes no
> sense to me.
> (Disclaimer: I've never configured a fallback setup like yours)
>
>
>> And avoid doing the more complicated setting up of normal mounts, etc.
>> since everything is working well so far without having to do so.
>>
>> -- 
>> that Jack Elliott
>> 541 848 7021
>> Producer Wednesday Point, Host, The Sunday Classics
>> KPOV 88.9, High Desert Radio
>> Audio geek
>>
>> On 06/01/2015 07:45 AM, Marvin Scholz wrote:
>>> On 1 Jun 2015, at 16:31, Jack Elliott 541 848 7021 wrote:
>>>
>>>> Hi Marvin, thank you.
>>>>
>>>> Okay, then to be clear, "webroot" for the purposes of running
>>>> Icecast
>>>> under Windows would be the same folder where icecast.xml is normally
>>>> found, i.e., C:\Program Files\icecast
>>> The webroot is where the web files are, so it should be `web` on
>>> Windows
>>> and
>>> contain files like `status.xsl`.
>>>
>>>> And, if I read you correctly, suppose my normal mount coming from my
>>>> source client is called /example  (it is an mp3 stream so I don't
>>>> specify , and highlighted in yellow, the extension). If I place a
>>>> file called "example.mp3" in the
>>>> webroot, and rename my live mount "example.mp3" then will Icecast
>>>> automatically fall back to the static file in the event that the
>>>> source
>>>> client goes off-air?
>>> No, I re-checked to be clear and the correct statement is:
>>> Icecast will treat static files like mounts if they are in webroot.
>>> This
>>> means that if you
>>> have a mount defined in your config with the name foo.mp3 and you
>>> have a
>>> foo.mp3 in your webroot,
>>> Icecast will apply the mount settings (like auth for example) to this
>>> static file.
>>> Best is to never have a static file with the same name as a
>>> mountpoint
>>> you want to stream to.
>>>
>>> But that handling makes it possible that you can use a static file as
>>> fallback mount, because Icecast will
>>> play the file, if there is one with the same name as the mountpoint.
>>> Just make sure to place the file in the webroot and name it to
>>> something
>>> that won't conflict with any other
>>> stream. Then enter that name for the fallback mount as explained in
>>> my
>>> last mail.
>>>
>>>> -- 
>>>> that Jack Elliott
>>>> 541 848 7021
>>>> Producer Wednesday Point, Host, The Sunday Classics
>>>> KPOV 88.9, High Desert Radio
>>>> Audio geek
>>>>
>>>> On 06/01/2015 07:21 AM, Marvin Scholz wrote:
>>>>> On 1 Jun 2015, at 16:04, Jack Elliott 541 848 7021 wrote:
>>>>>
>>>>>> Hi Philipp,
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>> I find in the Icecast docs the following:
>>>>>>
>>>>>> "_A fallback mount can also state a file that is located in
>>>>>> webroot._
>>>>> This is true, and itIt
>>>>> expects to be a mount name, as mounts will fallback to files in
>>>>> webroot
>>>>> with the same name, if they exists, you can use a file as well.
>>>>> exactly states what's wrong with your syntax. It
>>>>> expects to be a mount name, as mounts will fallback to files in
>>>>> webroot
>>>>> with the same name, if they exists, you can use a file as well.
>>>>> Therefore you can't just put the full path there, like you did.
>>>>> (And
>>>>> you
>>>>> path does not seem to point to webroot) If you want to have a
>>>>> fallback
>>>>> file, put it in webroot and just put the filename in the
>>>>> fallback-mount,
>>>>> as you would usually do with a mountpoint:
>>>>>
>>>>>    <fallback-mount>/fallback.mp3</fallback-mount>
>>>>>
>>>>>> This is useful for playing a pre-recorded file in the case of a
>>>>>> stream
>>>>>> going down. It will repeat until either the listener disconnects
>>>>>> or
>>>>>> a
>>>>>> stream comes back available and takes the listeners back. As per
>>>>>> usual, the file format should match the stream format, failing to
>>>>>> do
>>>>>> so may cause problems with playback."
>>>>>>
>>>>>> This is at http://icecast.org/docs/icecast-2.4.1/config-file.htm
>>>>>> <http://icecast.org/docs/icecast-2.4.1/config-file.html>
>>>>>>
>>>>>> So it appears that one can specify a static file as the fallback.
>>>>>> My
>>>>>> question has to do with whether Icecast will be happy with the
>>>>>> syntax
>>>>>> I have proposed as the path to the file.
>>>>>>
>>>>>> -- 
>>>>>> that Jack Elliott
>>>>>> 541 848 7021
>>>>>> Producer Wednesday Point, Host, The Sunday Classics
>>>>>> KPOV 88.9, High Desert Radio
>>>>>> Audio geek
>>>>>>
>>>>>> On 05/31/2015 05:12 AM, Philipp Schafft wrote:
>>>>>>> reflum,
>>>>>>>
>>>>>>> On Sat, 2015-05-30 at 09:30 -0700, that Jack Elliott wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Icecast.xml sh"A fallback mount can also state a file that is
>>>>>>>> located in webroot. This
>>>>>>>> is useful for playing a pre-recorded file in the case of a
>>>>>>>> stream
>>>>>>>> going
>>>>>>>> down. It will repeat until either the listener disconnects or a
>>>>>>>> stream
>>>>>>>> comes back available and takes the listeners back. As per usual,
>>>>>>>> the
>>>>>>>> file format should match the stream format, failing to do so may
>>>>>>>> cause
>>>>>>>> problems with playback."ows a sample path to a mountpoint
>>>>>>>> fallback
>>>>>>>> file as
>>>>>>>>
>>>>>>>> <fallback-mount>/example2.ogg</fallback-mount>
>>>>>>>>
>>>>>>>> Under Windows, will this next work?
>>>>>>>>
>>>>>>>> <fallback-mount>"C:\Users\username\Desktop\foldername\subfoldername
>>>>>>>> \fallback.mp3"</fallback-mount>
>>>>>>>> [...]
>>>>>>> No.
>>>>>>>
>>>>>>> I think you misunderstanding fallbacks a bit: Those are not files
>>>>>>> but
>>>>>>> actual mounts (which may be files within the webroot).
>>>>>>>
>>>>>>> I would suggest to read docs for more info:
>>>>>>> http://icecast.org/docs/icecast-2.4.1/config-file.html#mountsettings
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Icecast mailing list
>>>>>>> Icecast at xiph.org
>>>>>>> http://lists.xiph.org/mailman/listinfo/icecast
>>>>>> _______________________________________________
>>>>>> Icecast mailing list
>>>>>> Icecast at xiph.org
>>>>>> http://lists.xiph.org/mailman/listinfo/icecast
>>>>> _______________________________________________
>>>>> Icecast mailing list
>>>>> Icecast at xiph.org
>>>>> http://lists.xiph.org/mailman/listinfo/icecast
>>>> _______________________________________________
>>>> Icecast mailing list
>>>> Icecast at xiph.org
>>>> http://lists.xiph.org/mailman/listinfo/icecast
>>> _______________________________________________
>>> Icecast mailing list
>>> Icecast at xiph.org
>>> http://lists.xiph.org/mailman/listinfo/icecast
>> _______________________________________________
>> Icecast mailing list
>> Icecast at xiph.org
>> http://lists.xiph.org/mailman/listinfo/icecast
> _______________________________________________
> Icecast mailing list
> Icecast at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast



More information about the Icecast mailing list