Discussion:
[Savonet-users] Fallback issue
Alan Fahrner
2017-03-19 00:35:38 UTC
Permalink
Hi folks,

Hoping for pointers
I’ve search for an answer to this one too and cannot figure out what I am doing wrong.

The problem is that if I set "track_sensitive=false” in fallback, it always uses the fallback file (and never the primary source). Before I share my script, do I have do do a “playlist.safe” or a “mksafe” with the main source to get around this? This in the quickstart docs (http://savonet.sourceforge.net/doc-svn/quick_start.html <http://savonet.sourceforge.net/doc-svn/quick_start.html>) makes me think that’s not supposed to be the case:

When an output complains about its source, you have to turn it into an infallible one. Depending on the situation, many solutions are available. The function mksafe takes a source and returns an infallible source, streaming silence when the input stream becomes unavailable. In a radio-like stream, silence is not the prefered solution, and you will probably prefer to fallback on an infallible “security” source:

fallback([your_fallible_source_here, single("failure.ogg")])
Finally, if you do not care about failures, you can pass the parameter fallible=true to most outputs.

Right now I am setting I am leaving off the “track_sensitive=false” and having fallible=true in the output to have things work. All of my files are local (I am loading directories). This is the fallback call right now:

security = single("~/Dropbox/70sRockXYZ/Media/normal/Van Halen/Van Halen/02 Eruption.mp3")
s = fallback([s,security])

Can you help me understand what I am doing wrong. From the docs I thought I could just do the single() and then should be able to do this:

s = fallback(track_sensitive=false,[s,security])

But then all I hear is Van Halen’s Eruption over and over
and it’s a great song
but
 :-)

I’m glad to provide more of the script if it helps.

My best,

Alan
neralex
2017-03-19 11:07:52 UTC
Permalink
Hey!

I'm working with SHOUTcast v2 and maybe it helps to understand it. You
have to set the fallback after your live-port, its like a priority in
which order the sources will be used. If "live" not connected, so use
the "fallback".

#port and pass for djs
live =
input.harbor(icy=true,icy_metadata_charset="UTF-8","/",port=8610,password="hackme")

#fallback
emergency = single("/home/shoutcast/emergency/jingle_001.mp3")

radio = fallback(track_sensitive=false,[live,emergency])

If you would have a 24/7 rotating playlist you could set it between
"live" and "fallback".

radio = fallback(track_sensitive=false,[live,source_247,emergency])

That means "live" has the first prio and it can connect everytime. If
"live" is not connected then the 24/7 playlist will start and if the the
24/7 is not ready then your fallback will start the rotation of your
great song.
Post by Alan Fahrner
Hi folks,
Hoping for pointers…I’ve search for an answer to this one too and cannot
figure out what I am doing wrong.
The problem is that if I set "track_sensitive=false” in fallback, it
always uses the fallback file (and never the primary source). Before I
share my script, do I have do do a “playlist.safe” or a “mksafe” with
the main source to get around this? This in the quickstart docs
(http://savonet.sourceforge.net/doc-svn/quick_start.html) makes me think
When an output complains about its source, you have to turn it into
an infallible one. Depending on the situation, many solutions are
available. The function |mksafe| takes a source and returns an
infallible source, streaming silence when the input stream becomes
unavailable. In a radio-like stream, silence is not the prefered
solution, and you will probably prefer to |fallback| on an
fallback([your_fallible_source_here, single("failure.ogg")])
Finally, if you do not care about failures, you can pass the
parameter |fallible=true| to most outputs.
Right now I am setting I am leaving off the “track_sensitive=false” and
having fallible=true in the output to have things work. All of my files
security = single("~/Dropbox/70sRockXYZ/Media/normal/Van Halen/Van Halen/02 Eruption.mp3")
s = fallback([s,security])
Can you help me understand what I am doing wrong. From the docs I
s = fallback(track_sensitive=false,[s,security])
But then all I hear is Van Halen’s Eruption over and over…and it’s a
great song…but… :-)
I’m glad to provide more of the script if it helps.
My best,
Alan
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
https://lists.sourceforge.net/lists/listinfo/savonet-users
Alan Fahrner
2017-03-19 14:24:00 UTC
Permalink
Thanks for the second answer neralex!

I guess my equivalent of your situation is everything but the “live” part. So, imagine what you provided without live.

The question is, whey does it always go to the emergency file? Shouldn’t it only go to it if there is an issue with the source?

Thanks again,

Alan

From: neralex <***@freenet.de <mailto:***@freenet.de>>
Subject: Re: [Savonet-users] Fallback issue
Date: March 19, 2017 at 5:07:52 AM MDT
To: savonet-***@lists.sourceforge.net <mailto:savonet-***@lists.sourceforge.net>
Reply-To: savonet-***@lists.sourceforge.net <mailto:savonet-***@lists.sourceforge.net>


Hey!

I'm working with SHOUTcast v2 and maybe it helps to understand it. You have to set the fallback after your live-port, its like a priority in which order the sources will be used. If "live" not connected, so use the "fallback".

#port and pass for djs
live = input.harbor(icy=true,icy_metadata_charset="UTF-8","/",port=8610,password="hackme")

#fallback
emergency = single("/home/shoutcast/emergency/jingle_001.mp3")

radio = fallback(track_sensitive=false,[live,emergency])

If you would have a 24/7 rotating playlist you could set it between "live" and "fallback".

radio = fallback(track_sensitive=false,[live,source_247,emergency])

That means "live" has the first prio and it can connect everytime. If "live" is not connected then the 24/7 playlist will start and if the the 24/7 is not ready then your fallback will start the rotation of your great song.
Post by Alan Fahrner
Hi folks,
Hoping for pointers
I’ve search for an answer to this one too and cannot
figure out what I am doing wrong.
The problem is that if I set "track_sensitive=false” in fallback, it
always uses the fallback file (and never the primary source). Before I
share my script, do I have do do a “playlist.safe” or a “mksafe” with
the main source to get around this? This in the quickstart docs
(http://savonet.sourceforge.net/doc-svn/quick_start.html <http://savonet.sourceforge.net/doc-svn/quick_start.html>) makes me think
When an output complains about its source, you have to turn it into
an infallible one. Depending on the situation, many solutions are
available. The function |mksafe| takes a source and returns an
infallible source, streaming silence when the input stream becomes
unavailable. In a radio-like stream, silence is not the prefered
solution, and you will probably prefer to |fallback| on an
fallback([your_fallible_source_here, single("failure.ogg")])
Finally, if you do not care about failures, you can pass the
parameter |fallible=true| to most outputs.
Right now I am setting I am leaving off the “track_sensitive=false” and
having fallible=true in the output to have things work. All of my files
security = single("~/Dropbox/70sRockXYZ/Media/normal/Van Halen/Van
Halen/02 Eruption.mp3")
s = fallback([s,security])
Can you help me understand what I am doing wrong. From the docs I
s = fallback(track_sensitive=false,[s,security])
But then all I hear is Van Halen’s Eruption over and over
and it’s a
great song
but
 :-)
I’m glad to provide more of the script if it helps.
My best,
Alan
neralex
2017-03-19 16:07:05 UTC
Permalink
"Shouldn’t it only go to it if there is an issue with the source?"

Yes, you got it.
Shouldn’t it only go to it if there is an issue with the source?
Loading...