This seems to work:
```
#!/usr/bin/liquidsoap
def hls.audio(~id="",uri) =
pipeline = "uridecodebin uri=#{uri}"
input.gstreamer.audio(id=id, pipeline=pipeline)
end
ytv = argv(1)
url=get_process_output("youtube-dl -f 93 -g
https://www.youtube.com/watch?v=#{ytv}")
s = hls.audio(url)
output.icecast(
%mp3,
# or your preferred protocol
mount="/#{ytv}",
host="localhost", port=8000, password="hackme",
fallible=true,
s
)
```
dep: youtube-dl
Invoke as `liquidsoap youtube.hls.liq -- video_id`
e.g. for your video invoke as `liquidsoap youtube.hls.liq -- hHW1oY26kxQ`
The video id will be used as the icecast mountpoint.
I think you were missing the "uri=" in your pipeline example
[above](https://github.com/savonet/liquidsoap/issues/757#issuecomment-484591852)
--
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/757#issuecomment-484639718
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users