Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rolling release 2.3.x #32

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test-liquidsoap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
22 changes: 11 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
12 changes: 3 additions & 9 deletions scripts/transcoder/00-live.liq
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,18 @@ 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 =
fallback(
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
]
)

Expand Down
3 changes: 1 addition & 2 deletions scripts/transcoder/60-core.liq
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 4 additions & 3 deletions scripts/transcoder/outputs/hls.liq
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ end

## HLS segments

def segment_name(~position, ~extname=_, stream_name) =
def segment_name(metadata) =
let {position, duration, extname, stream_name} = metadata
segment_duration = int_of_float(duration)
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)
"#{segment_prefix}_#{duration}_#{position}_#{segment_timestamp}.ts"
"#{segment_prefix}_#{segment_duration}_#{position}_#{segment_timestamp}.ts"
end

def on_file_change(~state, fname) =
Expand Down