1
0
Fork 0

Compare commits

..

2 Commits

Author SHA1 Message Date
Icedream ee5fb8fd2f
Switch to bare flac streaming.
OGG causes issues due to its logical streams getting misinterpreted: liquidsoap
will skip the first bit of a new logical stream after metadata change leading to
stutters and skips in the final audio output.
2023-05-20 18:29:14 +02:00
Icedream fb6a325780
Revert cover data stripping as we don't stream out with OGG container anymore. 2023-05-20 18:28:23 +02:00
2 changed files with 4 additions and 21 deletions

View File

@ -156,7 +156,7 @@ def setup_harbor_metadata_api(~metadata_api_port=21338, ~id="", s) =
# set metadata on stream # set metadata on stream
m = list.assoc.filter(fun (_, v) -> null.defined(v), m) m = list.assoc.filter(fun (_, v) -> null.defined(v), m)
m = list.map(fun (v) -> (fst(v), null.get(snd(v))), m) m = list.map(fun (v) -> (fst(v), null.get(snd(v))), m)
log.info("New metadata for #{id}: #{json.stringify(m)}") log.info("New metadata for #{id}: new_track=#{json.stringify(new_track)} m=#{json.stringify(m)}")
s.insert_metadata(new_track=new_track, m) s.insert_metadata(new_track=new_track, m)
else else
log.info("No new metadata for #{id}") log.info("No new metadata for #{id}")
@ -204,12 +204,5 @@ def setup_harbor_metadata_api(~metadata_api_port=21338, ~id="", s) =
harbor.http.register.simple(port=metadata_api_port, method="POST", "/", on_http_metadata) harbor.http.register.simple(port=metadata_api_port, method="POST", "/", on_http_metadata)
harbor.http.register.simple(port=metadata_api_port, method="OPTIONS", "/", on_http_metadata_cors) harbor.http.register.simple(port=metadata_api_port, method="OPTIONS", "/", on_http_metadata_cors)
# TODO - we remove cover art for now as it disturbs REKT, this needs fixing s
# m = metadata.cover.remove(m)
def strip_cover_metadata(m) =
metadata.cover.remove(m)
end
metadata.map(insert_missing=false, strip=true, strip_cover_metadata, s)
#s
end end

View File

@ -139,8 +139,6 @@ setup_harbor_stream_api(internal_icecast(
if null.defined(rektfm_username) and null.defined(rektfm_password) then if null.defined(rektfm_username) and null.defined(rektfm_password) then
setup_harbor_stream_api(output.icecast( setup_harbor_stream_api(output.icecast(
id="out_a_rekt", id="out_a_rekt",
# %ogg(%flac),
# %mp3(bitrate=320),
fallible=true, fallible=true,
mount="rekt", mount="rekt",
port=60000, port=60000,
@ -151,16 +149,8 @@ if null.defined(rektfm_username) and null.defined(rektfm_password) then
description=null.get(stream_description), description=null.get(stream_description),
password=null.get(rektfm_password), password=null.get(rektfm_password),
start=false, start=false,
%ffmpeg( format="audio/flac",
format="ogg", %flac,
%audio(
codec="libvorbis",
flags=2, # CODEC_FLAG_QSCALE (enables VBR mode based on qscale aka global_quality)
global_quality=1180., # gets divided by FF_QP2LAMBDA=118
),
),
a, a,
# %ffmpeg(format="ogg", %audio.copy),
# a_vorbis,
)) ))
end end