**Describe the bug**
I am getting a youtube live stream using `gstreamer.hls`.
It is working, but ....
After 6 hours the youtube `.m3u8` URL expires (gives an forbidden status, 403 I
guess) and after I can't find a way for `gstreamer.hls` to stop. Actually I
want to restart the stream fetching, but I already have coded that in my script.
**To Reproduce**
Here goes my library function that handles youtube live streams. It is called
`youtube_live()`.
The script has `youtube-dl` and `jq` programs as dependencies.
```
def youtube_source(ytid) =
url = get_process_output("youtube-dl -f 93 -g https://youtu.be/#{ytid}")
json = get_process_output("youtube-dl -j https://youtu.be/#{ytid}")
title = string.trim(get_process_output("echo '#{json}' | jq -r
'.fulltitle'"))
uploader = string.trim(get_process_output("echo '#{json}' | jq -r
'.uploader'"))
def add_title(m)
[("title","[YouTube] #{title}"),("artist","#{uploader}")]
end
video_source = gstreamer.hls(url)
audio_source = drop_video(video_source)
map_metadata(strip=true, add_title, audio_source)
end
def youtube_live(ytid) =
fallback(track_sensitive=false, [youtube_source(ytid),
youtube_source(ytid)])
end
```
**Expected behavior**
There should be a parameter `on_error` or something that could make the stream
stop instead of keep trying using the same URL, at least the streams that have
a Fordibben status.
**Version details**
- OS: Manjaro Linux Deepin
- Liquidsoap Version: 1.3.7
- Opam version: 2.0.4
**Install method**
OPAM
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/savonet/liquidsoap/issues/762
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users