Compare commits
5 Commits
f94c88d4c5
...
66355faaf8
Author | SHA1 | Date |
---|---|---|
|
66355faaf8 | |
|
ed474182a1 | |
|
d1fb5d4535 | |
|
e213a140d2 | |
|
068058560a |
|
@ -1,4 +1,4 @@
|
||||||
ARG IMAGE=savonet/liquidsoap:v1.4.3
|
ARG IMAGE=savonet/liquidsoap:v1.4.4
|
||||||
# ARG IMAGE=savonet/liquidsoap:master
|
# ARG IMAGE=savonet/liquidsoap:master
|
||||||
|
|
||||||
# FROM $IMAGE
|
# FROM $IMAGE
|
||||||
|
|
|
@ -1,132 +0,0 @@
|
||||||
# Avoid liquidsoap hiccups due to outputs being offline and the audio just queueing up
|
|
||||||
# output.dummy(fallible=true, s)
|
|
||||||
|
|
||||||
output.harbor(
|
|
||||||
id="out_a_harbor",
|
|
||||||
%ogg(%flac),
|
|
||||||
# fallible=true,
|
|
||||||
port=8050,
|
|
||||||
mount="/outa/flac",
|
|
||||||
a)
|
|
||||||
output.harbor(
|
|
||||||
id="out_a_harbor",
|
|
||||||
%mp3(bitrate=320),
|
|
||||||
# fallible=true,
|
|
||||||
port=8050,
|
|
||||||
mount="/outa/mp3/320",
|
|
||||||
a)
|
|
||||||
output.harbor(
|
|
||||||
id="out_a_harbor",
|
|
||||||
%fdkaac(channels=2, samplerate=44100, bitrate=128),
|
|
||||||
# fallible=true,
|
|
||||||
port=8050,
|
|
||||||
mount="/outa/aac/128",
|
|
||||||
a)
|
|
||||||
output.icecast(
|
|
||||||
id="out_a_ifl",
|
|
||||||
%ogg(%flac),
|
|
||||||
fallible=true,
|
|
||||||
mount="ifl/live/1",
|
|
||||||
port=61120,
|
|
||||||
host="publish.streaminginter.net",
|
|
||||||
user="source",
|
|
||||||
password="ghs[73uqGab8_q",
|
|
||||||
start=false,
|
|
||||||
a)
|
|
||||||
# output.icecast(
|
|
||||||
# codec,
|
|
||||||
# id="local",
|
|
||||||
# fallible=false,
|
|
||||||
# mount="liquidsoap_out.ogg",
|
|
||||||
# port=18001,
|
|
||||||
# host="localhost",
|
|
||||||
# user="source",
|
|
||||||
# password="ghs[73uqGab8_q",
|
|
||||||
# start=false,
|
|
||||||
# a)
|
|
||||||
output.icecast(
|
|
||||||
id="out_a_rekt",
|
|
||||||
%ogg(%flac),
|
|
||||||
fallible=true,
|
|
||||||
mount="rekt",
|
|
||||||
port=60000,
|
|
||||||
#host="stream.rekt.network",
|
|
||||||
host="stream.rekt.fm",
|
|
||||||
user="icedream",
|
|
||||||
name=stream_name,
|
|
||||||
password="ghs[73uqGab8_q",
|
|
||||||
start=false,
|
|
||||||
a)
|
|
||||||
output.icecast(
|
|
||||||
id="hearthis",
|
|
||||||
%mp3(bitrate=320),
|
|
||||||
fallible=false,
|
|
||||||
mount="21287.ogg",
|
|
||||||
port=8080,
|
|
||||||
host="streamlive1.hearthis.at",
|
|
||||||
user="21287",
|
|
||||||
password="d48484l5j48424d484e443k4h5p574r2t5p4r4d4k4q5l4y5l5u5v2u5a4y5",
|
|
||||||
start=false,
|
|
||||||
a)
|
|
||||||
|
|
||||||
# va = drop_midi(s)
|
|
||||||
# output.dummy(fallible=true, va)
|
|
||||||
|
|
||||||
# # TODO - once input is actually lossless, make this reencode the audio!
|
|
||||||
# # flv = %ffmpeg(format="flv", audio_codec="copy", video_codec="copy")
|
|
||||||
# # ts_aac = %ffmpeg(format="mpegts", codec="aac", ar=44100, b="320k")
|
|
||||||
# # h264_6000k = %ffmpeg(
|
|
||||||
# # format="mpegts",
|
|
||||||
# # %video.copy)
|
|
||||||
# # aac_320k = %fdkaac(channels=2, samplerate=44100, bitrate=320, afterburner=true, aot="mpeg4_aac_lc", transmux="adts", sbr_mode=true)
|
|
||||||
# ts = %ffmpeg(format="mpegts",
|
|
||||||
# %audio(
|
|
||||||
# codec="libfdk_aac",
|
|
||||||
# channels=2,
|
|
||||||
# ar=44100,
|
|
||||||
# b="320k"),
|
|
||||||
# # %video(
|
|
||||||
# # codec="libx264",
|
|
||||||
# # b="6000k",
|
|
||||||
# # "x264-params"="scenecut=0:open_gop=0:min-keyint=60:keyint=60",
|
|
||||||
# # g=60,
|
|
||||||
# # r=30,
|
|
||||||
# # threads=4,
|
|
||||||
# # preset="superfast"),
|
|
||||||
# %video.copy,
|
|
||||||
# )
|
|
||||||
# streams = [
|
|
||||||
# ("video", ts),
|
|
||||||
# ]
|
|
||||||
# # fps = video.frame.rate()
|
|
||||||
# # samplerate = audio.samplerate()
|
|
||||||
# # output.external(
|
|
||||||
# # id="out_va_mixcloud",
|
|
||||||
# # reopen_delay=5.,
|
|
||||||
# # self_sync=false,
|
|
||||||
# # fallible=true,
|
|
||||||
# # start=false,
|
|
||||||
# # ts,
|
|
||||||
# # "ffmpeg -re -hide_banner -loglevel warning -f mpegts -i pipe:0 -c copy -f flv -bufsize 512k -rtmp_live 1 rtmp://rtmp.mixcloud.com/broadcast/e10868158398484b8589ee04b723f575",
|
|
||||||
# # va)
|
|
||||||
# # output.external(
|
|
||||||
# # id="out_va_hearthis",
|
|
||||||
# # reopen_delay=5.,
|
|
||||||
# # self_sync=false,
|
|
||||||
# # fallible=true,
|
|
||||||
# # start=false,
|
|
||||||
# # ts,
|
|
||||||
# # "ffmpeg -hide_banner -loglevel warning -f mpegts -i pipe:0 -c copy -f flv -bufsize 512k -rtmp_live 1 \"rtmp://video.hearthis.at/live/21287?secret=d48484l5j484\"",
|
|
||||||
# # va)
|
|
||||||
# output.harbor.hls(
|
|
||||||
# fallible=true,
|
|
||||||
# # port=8050,
|
|
||||||
# # mount="/outv.ts",
|
|
||||||
# # format="video/mp2t",
|
|
||||||
# port=8051,
|
|
||||||
# # segments=5,
|
|
||||||
# # segment_duration=2.,
|
|
||||||
# path="/outv",
|
|
||||||
# streams,
|
|
||||||
# # ts,
|
|
||||||
# s)
|
|
|
@ -3,7 +3,7 @@
|
||||||
def mksafe_soft(s) =
|
def mksafe_soft(s) =
|
||||||
blank_s = blank()
|
blank_s = blank()
|
||||||
blank_v = drop_audio(blank_s)
|
blank_v = drop_audio(blank_s)
|
||||||
silent_a = amplify(0.00005, noise())
|
silent_a = amplify(0.000075, noise())
|
||||||
silent_s = mux_video(video=blank_v, silent_a)
|
silent_s = mux_video(video=blank_v, silent_a)
|
||||||
mksafe(fallback(track_sensitive=false, [s, silent_s]))
|
mksafe(fallback(track_sensitive=false, [s, silent_s]))
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,16 +15,38 @@ set("frame.video.height", 1080)
|
||||||
%include "metadata_api.liq"
|
%include "metadata_api.liq"
|
||||||
%include "silent_fallback.liq"
|
%include "silent_fallback.liq"
|
||||||
|
|
||||||
s = input.srt(id="input_srt_main", port=9000)
|
s = input.srt(id="input_srt_main", max=3., port=9000)
|
||||||
|
output.dummy(fallible=true, s)
|
||||||
|
|
||||||
# Split audio off to be handled specially
|
# Split audio off to be handled specially
|
||||||
a = drop_video(s)
|
a = drop_video(s)
|
||||||
a = mksafe_soft(a)
|
a = mksafe_soft(a)
|
||||||
a = setup_harbor_metadata_api(a)
|
a = setup_harbor_metadata_api(a)
|
||||||
|
output.dummy(a)
|
||||||
output.harbor(
|
output.harbor(
|
||||||
id="out_a_harbor",
|
id="out_a_harbor",
|
||||||
%ogg(%flac),
|
%ogg(%flac),
|
||||||
# fallible=true,
|
# fallible=true,
|
||||||
port=8050,
|
port=8050,
|
||||||
mount="/outa",
|
mount="/outa/flac",
|
||||||
|
a)
|
||||||
|
output.harbor(
|
||||||
|
id="out_a_harbor",
|
||||||
|
%mp3(bitrate=320),
|
||||||
|
# fallible=true,
|
||||||
|
port=8050,
|
||||||
|
mount="/outa/mp3",
|
||||||
|
a)
|
||||||
|
output.icecast(
|
||||||
|
id="out_a_rekt",
|
||||||
|
%mp3(bitrate=320),
|
||||||
|
# fallible=true,
|
||||||
|
mount="rekt",
|
||||||
|
port=60000,
|
||||||
|
#host="stream.rekt.network",
|
||||||
|
host="stream.rekt.fm",
|
||||||
|
user="icedream",
|
||||||
|
name=stream_name,
|
||||||
|
password="ghs[73uqGab8_q",
|
||||||
|
start=false,
|
||||||
a)
|
a)
|
||||||
|
|
|
@ -15,8 +15,8 @@ daemon_ffmpeg() {
|
||||||
shutdown_ffmpeg() {
|
shutdown_ffmpeg() {
|
||||||
if is_ffmpeg_running
|
if is_ffmpeg_running
|
||||||
then
|
then
|
||||||
kill "$ffmpeg_pid"
|
kill "$ffmpeg_pid" || true
|
||||||
wait "$ffmpeg_pid"
|
wait "$ffmpeg_pid" || true
|
||||||
fi
|
fi
|
||||||
ffmpeg_pid=
|
ffmpeg_pid=
|
||||||
}
|
}
|
||||||
|
@ -60,11 +60,11 @@ do
|
||||||
echo "starting ffmpeg with audio source: $found_audio_source" >&2
|
echo "starting ffmpeg with audio source: $found_audio_source" >&2
|
||||||
# HACK - can't use the standard mpegts here, but liquidsoap will happily accept anything ffmpeg can parse (by default)… so let's just use nut here even though it feels super duper wrong
|
# HACK - can't use the standard mpegts here, but liquidsoap will happily accept anything ffmpeg can parse (by default)… so let's just use nut here even though it feels super duper wrong
|
||||||
daemon_ffmpeg -loglevel warning -extra_ips 192.168.188.21 -f libndi_newtek -i "$found_audio_source" -c copy -f nut -write_index false "${target_url}"
|
daemon_ffmpeg -loglevel warning -extra_ips 192.168.188.21 -f libndi_newtek -i "$found_audio_source" -c copy -f nut -write_index false "${target_url}"
|
||||||
elif is_ffmpeg_running && [ -z "$found_audio_source" ] && [ "$offline" -gt 3 ]
|
elif is_ffmpeg_running && [ -z "$found_audio_source" ] && [ "$offline" -gt 0 ]
|
||||||
then
|
then
|
||||||
echo "shutting down ffmpeg since no source has been found" >&2
|
echo "shutting down ffmpeg since no source has been found" >&2
|
||||||
shutdown_ffmpeg # it won't shut down by itself unfortunately
|
shutdown_ffmpeg # it won't shut down by itself unfortunately
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 3
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue