From 9631f2c81cbcb11545122f5592695fcd319f4c06 Mon Sep 17 00:00:00 2001 From: Youenn Piolet Date: Wed, 4 Sep 2024 17:25:58 +0200 Subject: [PATCH 1/6] feat: bump liquidsoap to rolling-release --- docker-compose.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1c08247..8e9171b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: - /conf/myradio.liq - /scripts/transcoder/00-live.liq container_name: liquidsoap-myradio - image: savonet/liquidsoap:v2.2.5 + image: savonet/liquidsoap:rolling-release-v2.3.x networks: - default restart: unless-stopped @@ -36,7 +36,7 @@ services: - /conf/myradiosurround.liq - /scripts/transcoder/00-live.liq container_name: liquidsoap-myradiosurround - image: savonet/liquidsoap:v2.2.5 + image: savonet/liquidsoap:rolling-release-v2.3.x networks: - default restart: unless-stopped @@ -76,7 +76,7 @@ services: - "srt://liquidsoap-myradio:10000" # voieA_caller1 container_name: source-voieA-caller1 entrypoint: [] - image: savonet/liquidsoap:v2.2.5 + image: savonet/liquidsoap:rolling-release-v2.3.x networks: - default restart: unless-stopped @@ -97,7 +97,7 @@ services: - "srt://liquidsoap-myradio:10002" # voieB_caller1 container_name: source-voieB-caller1 entrypoint: [] - image: savonet/liquidsoap:v2.2.5 + image: savonet/liquidsoap:rolling-release-v2.3.x networks: - default restart: unless-stopped @@ -118,7 +118,7 @@ services: - "srt://liquidsoap-myradio:10004" # override_caller1 container_name: source-override-caller1 entrypoint: [] - image: savonet/liquidsoap:v2.2.5 + image: savonet/liquidsoap:rolling-release-v2.3.x networks: - default restart: unless-stopped @@ -130,7 +130,7 @@ services: - /conf/mystreamersurround.liq - /scripts/streamer/00-live.liq container_name: source-mystreamersurround - image: savonet/liquidsoap:v2.2.5 + image: savonet/liquidsoap:rolling-release-v2.3.x networks: - default restart: unless-stopped @@ -158,7 +158,7 @@ services: - "srt://liquidsoap-myradiosurround:10012" # voieB_caller1 container_name: source-ffmpegsurround entrypoint: [] - image: savonet/liquidsoap:v2.2.5 + image: savonet/liquidsoap:rolling-release-v2.3.x networks: - default restart: unless-stopped @@ -299,7 +299,7 @@ services: - /conf/myradio.liq - /scripts/transcoder/00-live.liq container_name: liquidsoap-test-transcoder-stereo - image: savonet/liquidsoap:v2.2.5 + image: savonet/liquidsoap:rolling-release-v2.3.x networks: - default volumes: @@ -312,7 +312,7 @@ services: - /conf/myradiosurround.liq - /scripts/transcoder/00-live.liq container_name: liquidsoap-test-transcoder-surround - image: savonet/liquidsoap:v2.2.5 + image: savonet/liquidsoap:rolling-release-v2.3.x networks: - default volumes: @@ -325,7 +325,7 @@ services: - /conf/mystreamer.liq - /scripts/streamer/00-live.liq container_name: liquidsoap-test-streamer-stereo - image: savonet/liquidsoap:v2.2.5 + image: savonet/liquidsoap:rolling-release-v2.3.x networks: - default volumes: @@ -338,7 +338,7 @@ services: - /conf/mystreamersurround.liq - /scripts/streamer/00-live.liq container_name: liquidsoap-test-streamer-surround - image: savonet/liquidsoap:v2.2.5 + image: savonet/liquidsoap:rolling-release-v2.3.x networks: - default volumes: From 642800a4dd689ed40155f50148cea72036ab21cf Mon Sep 17 00:00:00 2001 From: Youenn Piolet Date: Wed, 4 Sep 2024 17:48:41 +0200 Subject: [PATCH 2/6] fix(srt): remove clock_safe in srt inputs --- scripts/transcoder/60-core.liq | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/transcoder/60-core.liq b/scripts/transcoder/60-core.liq index 174fff0..9bc2ed9 100644 --- a/scripts/transcoder/60-core.liq +++ b/scripts/transcoder/60-core.liq @@ -11,8 +11,7 @@ def source_tag(s, tag) = end def mk_source(s) = - srt_input = - input.srt(id=(s.name : string), max=3.0, clock_safe=true, port=s.port) + srt_input = input.srt(id=(s.name : string), max=3.0, port=s.port) # Create the several latency time series for this input latency_metrics_create(label_values=[radio_name, "input", s.name], srt_input) From 5fe5cef6373204f4a7505bf8186d73b83e4e8818 Mon Sep 17 00:00:00 2001 From: Youenn Piolet Date: Tue, 10 Sep 2024 10:30:44 +0200 Subject: [PATCH 3/6] fix(sources): don't define source type when using sources like safe_blank --- scripts/transcoder/00-live.liq | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/transcoder/00-live.liq b/scripts/transcoder/00-live.liq index ab78d0b..644b2ff 100755 --- a/scripts/transcoder/00-live.liq +++ b/scripts/transcoder/00-live.liq @@ -49,13 +49,7 @@ live = ) def mk_fallback_source(result, s) = - if - s.is_autofallback - then - [...result, (s.source : source(audio=pcm))] - else - result - end + if s.is_autofallback then [...result, s.source] else result end end radio_prod = @@ -63,10 +57,10 @@ radio_prod = id="fallback_prod", track_sensitive=false, [ - (live : source(audio=pcm)), + live, ...list.fold(mk_fallback_source, [], input_sources), - (safe_blank : source(audio=pcm)) + safe_blank ] ) From 6cfd8229f232d625c85dc788ef711c8a2bcec9ab Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sun, 15 Sep 2024 14:52:49 -0500 Subject: [PATCH 4/6] Use new metadata for segment duration. --- scripts/transcoder/outputs/hls.liq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/transcoder/outputs/hls.liq b/scripts/transcoder/outputs/hls.liq index b992575..34554a4 100644 --- a/scripts/transcoder/outputs/hls.liq +++ b/scripts/transcoder/outputs/hls.liq @@ -45,9 +45,9 @@ end ## HLS segments -def segment_name(~position, ~extname=_, stream_name) = +def segment_name(metadata) = + let {position, duration, extname, stream_name} = metadata segment_timestamp = int_of_float(time()) - duration = int_of_float(4.0) # Add the codec to the segment name because it's expected by segment-forwarder segment_prefix = string.replace(pattern="_", fun (_) -> "_aac_", stream_name) From 435802a0045a14ca68dc42603028920cfa8f0fcf Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sun, 15 Sep 2024 15:27:42 -0500 Subject: [PATCH 5/6] Bump docker images in github workflow. --- .github/workflows/test-liquidsoap.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-liquidsoap.yml b/.github/workflows/test-liquidsoap.yml index 04e2188..b24dc50 100644 --- a/.github/workflows/test-liquidsoap.yml +++ b/.github/workflows/test-liquidsoap.yml @@ -27,7 +27,7 @@ jobs: name: liquidsoap syntax (transcoder stereo) runs-on: ubuntu-latest container: - image: savonet/liquidsoap:v2.2.5@sha256:2b3ab71509dc48f47f0f99b98316090081eeaf37bea3c96a3edaa4a55ec57f41 + image: savonet/liquidsoap:rolling-release-v2.3.x # TODO: Fix version after release/merge. options: --user root steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -37,7 +37,7 @@ jobs: name: liquidsoap syntax (transcoder surround) runs-on: ubuntu-latest container: - image: savonet/liquidsoap:v2.2.5@sha256:2b3ab71509dc48f47f0f99b98316090081eeaf37bea3c96a3edaa4a55ec57f41 + image: savonet/liquidsoap:rolling-release-v2.3.x options: --user root steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -47,7 +47,7 @@ jobs: name: liquidsoap syntax (streamer stereo) runs-on: ubuntu-latest container: - image: savonet/liquidsoap:v2.2.5@sha256:2b3ab71509dc48f47f0f99b98316090081eeaf37bea3c96a3edaa4a55ec57f41 + image: savonet/liquidsoap:rolling-release-v2.3.x options: --user root steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -57,7 +57,7 @@ jobs: name: liquidsoap syntax (streamer surround) runs-on: ubuntu-latest container: - image: savonet/liquidsoap:v2.2.5@sha256:2b3ab71509dc48f47f0f99b98316090081eeaf37bea3c96a3edaa4a55ec57f41 + image: savonet/liquidsoap:rolling-release-v2.3.x options: --user root steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 From b2aa20c894259335e7bea3a5c4c2f2769a1881ee Mon Sep 17 00:00:00 2001 From: Youenn Piolet Date: Wed, 18 Sep 2024 11:51:26 +0200 Subject: [PATCH 6/6] fix(hls): cast segment duration to int --- scripts/transcoder/outputs/hls.liq | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/transcoder/outputs/hls.liq b/scripts/transcoder/outputs/hls.liq index 34554a4..e51fce0 100644 --- a/scripts/transcoder/outputs/hls.liq +++ b/scripts/transcoder/outputs/hls.liq @@ -47,11 +47,12 @@ end def segment_name(metadata) = let {position, duration, extname, stream_name} = metadata + segment_duration = int_of_float(duration) segment_timestamp = int_of_float(time()) # Add the codec to the segment name because it's expected by segment-forwarder segment_prefix = string.replace(pattern="_", fun (_) -> "_aac_", stream_name) - "#{segment_prefix}_#{duration}_#{position}_#{segment_timestamp}.ts" + "#{segment_prefix}_#{segment_duration}_#{position}_#{segment_timestamp}.ts" end def on_file_change(~state, fname) =