Hi all,


 How to make a fallback source always load from its beginning ?


I made a short liquidsoap script in the intent to broadcast live streams (input is from a VOIP software such as Mumble). I added a fallback source `jingle_ad_jingles` which is a sequence that I would like to be loaded from its beginning whenever my live source is switched off.

Unfortunately, whenever I stop my live source, the fallback source (sequence) `jingle_ad_jingles` doesn't start from it's beginning ; instead it often start somewhere in the middle of the sequence, during a song, etc.

How to make this fallback source **always** load **from its beginning** whenever my live source is switched off ?

```
#!/usr/bin/env liquidsoap

# Save logs in file
set("log.file.path", "<path>")

# Print logs in terminal
set("log.stdout", true)


# -------
# Sources
# -------

# Jingles playlist
jingles = playlist("~/radio/jingles/jingles.txt")

# Ads playlist
ads = playlist("~/radio/ads/ads.txt")

# Jingle/Adverstising sequence :
# 1. one random jingle
# 2. one random ad
# 3. playlist of jingles running endlessly
jingle_ad_jingles = sequence([jingles, ads, jingles])

# Live stream from VOIP/Mumble
live = input.pulseaudio()


# -----
# Radio
# -----

# Adding live VOIP/Mumble stream
# The stream is switched off whenever a blank (> 5.0 sec) is detected
radio = strip_blank(max_blank = 5.0, live)

# Adding the jingle_ad_jingles sequence as a fallback source for the live stream
# ---- PROBLEM ---- :
# fallback occurences won't load from the beginning
# of its source (jingle_ad_jingles sequence).
radio = fallback(track_sensitive = false, [radio, mksafe(jingle_ad_jingles)])


# ------------------------------------
# Streaming output to Shoutcast server
# ------------------------------------

output.shoutcast(%mp3,
                host = "xxx", port =xxx,
                password = "xxx",
                radio)
```
Thanks in advance.
------------------------------------------------------------------------------
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to