I was trying to insert metadata on stream
(https://github.com/savonet/liquidsoap/issues/570) and it worked, but now I
tried it in my real radio script and its not working.
The main differences are that the input now is a continuous stream from jackd
application and the output formats are .opus and .mp3. The .liq script works ok
but no metadata is shown when playing the stream.
Script I'm running:
set("log.stdout",true)
set("log.file.append",true)
set("log.level", 4)
set("log.file.path","/home/radiola/liquidsoap.log")
set("frame.audio.samplerate",48000)
#Update Title function
def append_title(m) =
newtitle = list.hd(
get_process_lines(
"sudo mysql mydatabase -u root -phackme -se \\"SELECT CAST(CONVERT(Title
USING utf8) AS binary) FROM mytable WHERE id='1'\\""
)
)
[("title","#{newtitle}")]
end
#Update artist function
def append_artist(m) =
newartist = list.hd(
get_process_lines(
"sudo mysql mydatabase -u root -phackme -se \"SELECT CAST(CONVERT(Artist
USING utf8) AS binary) FROM mytable WHERE id='1'\""
)
)
[("artist","#{newartist}")]
end
#Source stream comes from jackd
s = input.jack()
#Insert metadata on stream:
s = map_metadata(append_title, s)
s = map_metadata(append_artist, s)
output.icecast(%opus(
vbr="constrained",
complexity=10,
max_bandwidth="full_band",
samplerate=48000,
bitrate=128,
channels=2,
),
host="localhost",
port=8000,
password="hackme",
mount="aovivo.opus",
s
)
output.icecast(%mp3.cbr(
bitrate=128,
samplerate=48000
),
host="localhost",
port=8000,
password="hackme",
mount="aovivo.mp3",
s
)
The log file is as follows:
2018/07/19 15:36:15 [frame:3] Using 48000Hz audio, 25Hz video, 48000Hz master.
2018/07/19 15:36:15 [frame:3] Frame size must be a multiple of 1920 ticks =
1920 audio samples = 1 video samples.
2018/07/19 15:36:15 [frame:3] Targetting 'frame.duration': 0.04s = 1920 audio
samples = 1920 ticks.
2018/07/19 15:36:15 [frame:3] Frames last 0.04s = 1920 audio samples = 1 video
samples = 1920 ticks.
2018/07/19 15:36:15 [video.converter:4] Couldn't find preferred video
converter: gavl.
2018/07/19 15:36:15 [audio.converter:4] Using preferred samplerate converter:
libsamplerate.
2018/07/19 15:36:15 [threads:3] Created thread "generic queue #1".
2018/07/19 15:36:15 [threads:3] Created thread "generic queue #2".
2018/07/19 15:36:15 [threads:3] Thread "generic queue #2" terminated.
2018/07/19 15:36:15 [threads:3] Thread "generic queue #1" terminated.
2018/07/19 15:36:15 [clock:4] Currently 1 clocks allocated.
2018/07/19 15:36:15 [clock.wallclock_bjack:4] Starting 3 sources...
2018/07/19 15:36:15 [source:4] Source input.jack_5625 gets up.
2018/07/19 15:36:15 [input.jack_5625:4] Content kind is
{audio=2;video=0;midi=0}.
2018/07/19 15:36:15 [clock.wallclock_bjack:4] Delegating clock to active
sources.
2018/07/19 15:36:15 [input.jack_5625:4] Activations changed:
static=[input.jack_5625], dynamic=[].
2018/07/19 15:36:15 [input.jack_5625:4] Enabling caching mode: active source.
2018/07/19 15:36:15 [source:4] Source output.icecast_5634 gets up.
2018/07/19 15:36:15 [source:4] Source map_metadata_5632 gets up.
2018/07/19 15:36:15 [map_metadata_5632:4] Content kind is
{audio=2;video=0;midi=0}.
2018/07/19 15:36:15 [source:4] Source map_metadata_5630 gets up.
2018/07/19 15:36:15 [map_metadata_5630:4] Content kind is
{audio=2;video=0;midi=0}.
2018/07/19 15:36:15 [input.jack_5625:4] Activations changed:
static=[map_metadata_5630:map_metadata_5632:aovivo(dot)opus:aovivo(dot)opus,
input.jack_5625], dynamic=[].
2018/07/19 15:36:15 [map_metadata_5630:4] Activations changed:
static=[map_metadata_5632:aovivo(dot)opus:aovivo(dot)opus], dynamic=[].
2018/07/19 15:36:15 [map_metadata_5632:4] Activations changed:
static=[aovivo(dot)opus:aovivo(dot)opus], dynamic=[].
2018/07/19 15:36:15 [aovivo(dot)opus:4] Activations changed:
static=[aovivo(dot)opus], dynamic=[].
2018/07/19 15:36:15 [aovivo(dot)opus:4] Enabling caching mode: active source.
2018/07/19 15:36:15 [source:4] Source output.icecast_5635 gets up.
2018/07/19 15:36:15 [map_metadata_5632:4] Activations changed:
static=[aovivo(dot)mp3:aovivo(dot)mp3, aovivo(dot)opus:aovivo(dot)opus],
dynamic=[].
2018/07/19 15:36:15 [map_metadata_5632:4] Enabling caching mode: two static
activations.
2018/07/19 15:36:15 [aovivo(dot)mp3:4] Activations changed:
static=[aovivo(dot)mp3], dynamic=[].
2018/07/19 15:36:15 [aovivo(dot)mp3:4] Enabling caching mode: active source.
2018/07/19 15:36:15 [threads:3] Created thread "input.jack_5625" (1 total).
2018/07/19 15:36:15 [aovivo(dot)opus:3] Connecting mount aovivo.opus for
sou...@xxx.xxx.xxx.xxx...
2018/07/19 15:36:15 [aovivo(dot)opus:3] Connection setup was successful.
2018/07/19 15:36:15 [aovivo(dot)mp3:3] Connecting mount aovivo.mp3 for
sou...@xxx.xxx.xxx.xxx...
2018/07/19 15:36:15 [aovivo(dot)mp3:3] Connection setup was successful.
2018/07/19 15:36:15 [threads:3] Created thread "wallclock_bjack" (2 total).
2018/07/19 15:36:15 [clock.wallclock_bjack:3] Streaming loop starts,
synchronized by active sources.
2018/07/19 15:36:15 [clock:4] Main phase starts.
2018/07/19 15:36:15 [map_metadata_5630:3] Inserting missing metadata.
2018/07/19 15:36:15 [ogg.muxer:4] aovivo(dot)opus: Starting all streams
Would an input from jackd trigger the function that updates metadata at all?
And do opus and mp3 support this way of inserting metadata?
--
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/584
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users