liquidsoap icon indicating copy to clipboard operation
liquidsoap copied to clipboard

Metadata randomly dropped with mkpascal script

Open bjarn opened this issue 2 years ago • 0 comments

Copied this issue from AzuraCast as I believe it's Liquidsoap related (https://github.com/AzuraCast/AzuraCast/issues/5343)

Describe the bug Every 2 tracks, it shows "Unknown" in the now playing response.

Stripped response from websocket including now playing. At this time Bastille - Pompeii was palying, however it was still shown as "next song" whilst the current song is "Unknown".

"live":{"is_live":false,"streamer_name":"","broadcast_start":null},"now_playing":{"sh_id":670999,"played_at":1651654625,"duration":0,"playlist":"","streamer":"","is_request":false,"song":{"id":"ad921d60486366258809553a3db49a4a","text":" - Unknown","artist":"","title":"Unknown","album":"","genre":"","lyrics":"","art":"https:\/\/REDACTED\/static\/uploads\/album_art.1644844226.jpg","custom_fields":{"REDACTED":null,"year":null}},"elapsed":175,"remaining":0},"playing_next":{"cued_at":1651654405,"played_at":1651654794,"duration":212,"playlist":"D - Oldies","is_request":false,"song":{"id":"49f07366d75c3e848a5807201badff86","text":"Bastille - Pompeii","artist":"Bastille","title":"Pompeii","album":"Bad Blood","genre":"Alternative","lyrics":"","art":"https:\/\/REDACTED\/api\/station\/1\/art\/ae342ec2e45417f1e3109a0c-1603889533.jpg","custom_fields":{"REDACTED":null,"year":"2013"}}},"song_history":[{"sh_id":670996,"played_at":1651654412,"duration":212,"playlist":"A - Burn Hits","streamer":"","is_request":false,"song":{"id":"a4d80e90f1b0a0558437cb22cc65c838","text":"Kygo - Dancing Feet (feat. DNCE)","artist":"Kygo","title":"Dancing Feet (feat. DNCE)","album":"Dancing Feet (feat. DNCE)","genre":"Dance","lyrics":"","art":"https:\/\/REDACTED\/api\/station\/1\/art\/16ec0e7bf246968af0fd77b8-1645795407.jpg","custom_fields":{"REDACTED":null,"year":"2022"}}},{"sh_id":670994,"played_at":1651654227,"duration":185,"playlist":"","streamer":"","is_request":false,"song":{"id":"ad921d60486366258809553a3db49a4a","text":" - Unknown","artist":"","title":"Unknown","album":"","genre":"","lyrics":"","art":"https:\/\/REDACTED\/static\/uploads\/album_art.1644844226.jpg","custom_fields":{"REDACTED":null,"year":null}}},{"sh_id":670992,"played_at":1651654062,"duration":167,"playlist":"D - Oldies","streamer":"","is_request":false,"song":{"id":"3f0d1df2cfae11f25a7d77a5584f4d0b","text":"The Overslept - Everything You Want","artist":"The Overslept","title":"Everything You Want","album":"Everything You Want","genre":"Alternative","lyrics":"","art":"https:\/\/REDACTED\/api\/station\/1\/art\/ce84318b0465ef5f4dbca90f-1608327939.jpg","custom_fields":{"REDACTED":null,"year":"2020"}}},{"sh_id":670990,"played_at":1651653866,"duration":196,"playlist":"","streamer":"","is_request":false,"song":{"id":"ad921d60486366258809553a3db49a4a","text":" - Unknown","artist":"","title":"Unknown","album":"","genre":"","lyrics":"","art":"https:\/\/REDACTED\/static\/uploads\/album_art.1644844226.jpg","custom_fields":{"REDACTED":null,"year":null}}},{"sh_id":670989,"played_at":1651653678,"duration":188,"playlist":"D - Oldies","streamer":"","is_request":false,"song":{"id":"f889e26fe017ba240020e475381459fa","text":"X Ambassadors - Unsteady","artist":"X Ambassadors","title":"Unsteady","album":"The Reason EP","genre":"Alternative","lyrics":"","art":"https:\/\/REDACTED\/api\/station\/1\/art\/372969c4528345cb40c29f94-1603889817.jpg","custom_fields":{"REDACTED":null,"year":"2014"}}}],"is_online":true,"cache":"event"}	1651654796.2899065

Visual output: CleanShot 2022-05-04 at 11 04 18@2x

Might be related to https://github.com/AzuraCast/AzuraCast/issues/4825? I am still using this same mkpascal script since the latest 2.0.4-v2 patch.

2022/05/04 10:53:24 [decoder:2] Decoding "/var/azuracast/stations/REDACTED/media/Jingles/2021 - Q3/REDACTED-_songs_you_forgot_about. REDACTED.wav" ended: Ffmpeg_decoder.End_of_file.
2022/05/04 10:53:25 [next_song:3] Prepared "/var/azuracast/stations/REDACTED/media/Muziek/kygo_-_dancing_feet_(feat._dnce).mp3" (RID 1).
[mp3float @ 0x7f8bc89e0580] Could not update timestamps for skipped samples.
2022/05/04 10:53:25 [cue_next_song:3] Cueing in...
2022/05/04 10:53:25 [lang:3] API feedback - Sending POST request to 'http://127.0.0.1:9010/api/internal/1/liquidsoap/feedback' with body: {
2022/05/04 10:53:25 [lang:3]   "song_id": "a4d80e90f1b0a0558437cb22cc65c838",
2022/05/04 10:53:25 [lang:3]   "playlist_id": "56",
2022/05/04 10:53:25 [lang:3]   "media_id": "6956"
2022/05/04 10:53:25 [lang:3] }
2022/05/04 10:53:25 [lang:3] API nextsong - Sending POST request to 'http://127.0.0.1:9010/api/internal/1/liquidsoap/nextsong' with body: 
2022/05/04 10:53:25 [lang:3] API feedback - Response (200): true
2022/05/04 10:53:25 [lang:3] API nextsong - Response (200): annotate:title="Pompeii",artist="Bastille",duration="214.15",song_id="49f07366d75c3e848a5807201badff86",media_id="3291",liq_amplify="-4.90dB",liq_cross_duration="1.50",liq_fade_out="1.50",liq_cue_in="0.30",liq_cue_out="212.90",playlist_id="37":media:Muziek/Bastille - Pompeii.mp3
2022/05/04 10:53:25 [cross_0:3] Analysis: -25.888297dB / -41.748727dB (0.48s / 0.48s)
2022/05/04 10:53:25 [crossfade:3] Simple transition: crossed, fade-in, fade-out.
2022/05/04 10:53:25 [crossfade:3] cross duration: 0.5, after duration: 215.2
2022/05/04 10:53:27 [clock.main:2] We must catchup 1.41 seconds!
2022/05/04 10:53:28 [clock.main:2] We must catchup 1.14 seconds!
2022/05/04 10:53:31 [clock.main:2] We must catchup 0.31 seconds!
2022/05/04 10:56:56 [cue_next_song:3] Cueing out...
2022/05/04 10:56:56 [next_song:3] Prepared "/var/azuracast/stations/REDACTED/media/Muziek/Bastille - Pompeii.mp3" (RID 7).
[mp3float @ 0x7f8bc87bf240] Could not update timestamps for skipped samples.
2022/05/04 10:56:56 [cue_next_song:3] Cueing in...
2022/05/04 10:56:56 [lang:3] API nextsong - Sending POST request to 'http://127.0.0.1:9010/api/internal/1/liquidsoap/nextsong' with body: 
2022/05/04 10:56:56 [lang:3] API feedback - Sending POST request to 'http://127.0.0.1:9010/api/internal/1/liquidsoap/feedback' with body: {
2022/05/04 10:56:56 [lang:3]   "song_id": "49f07366d75c3e848a5807201badff86",
2022/05/04 10:56:56 [lang:3]   "playlist_id": "37",
2022/05/04 10:56:56 [lang:3]   "media_id": "3291"
2022/05/04 10:56:56 [lang:3] }
2022/05/04 10:56:56 [lang:3] API feedback - Response (200): true
2022/05/04 10:56:56 [lang:3] API nextsong - Response (200): annotate:title="000014fd",duration="9.33",song_id="dbdac27aa2ec0f63d7a36045ff702f70",media_id="5109",liq_amplify="-7.90dB",liq_cross_duration="4.00",liq_cue_in="0.00",jingle_mode="true":media:Jingles/2020/000014fd.mp3
2022/05/04 10:56:57 [cross_0:3] Analysis: -35.114419dB / -39.209432dB (1.48s / 1.48s)
2022/05/04 10:56:57 [crossfade:3] Simple transition: crossed, fade-in, fade-out.
2022/05/04 10:56:57 [crossfade:3] cross duration: 1.5, after duration: -1.
2022/05/04 10:56:57 [clock.main:2] We must catchup 1.15 seconds!
2022/05/04 10:57:00 [clock.main:2] We must catchup 0.34 seconds!
2022/05/04 11:00:27 [cue_next_song:3] Cueing out...
2022/05/04 11:00:27 [next_song:3] Prepared "/var/azuracast/stations/REDACTED/media/Jingles/2020/000014fd.mp3" (RID 2).
[mp3float @ 0x7f8bc8553b00] Could not update timestamps for skipped samples.
2022/05/04 11:00:27 [cue_next_song:3] Cueing in...
2022/05/04 11:00:27 [lang:3] API feedback - Sending POST request to 'http://127.0.0.1:9010/api/internal/1/liquidsoap/feedback' with body: {
2022/05/04 11:00:27 [lang:3]   "song_id": "dbdac27aa2ec0f63d7a36045ff702f70",
2022/05/04 11:00:27 [lang:3]   "playlist_id": "",
2022/05/04 11:00:27 [lang:3]   "media_id": "5109"
2022/05/04 11:00:27 [lang:3] }
2022/05/04 11:00:27 [lang:3] API nextsong - Sending POST request to 'http://127.0.0.1:9010/api/internal/1/liquidsoap/nextsong' with body: 
2022/05/04 11:00:27 [lang:3] API feedback - Response (200): true
2022/05/04 11:00:27 [lang:3] API nextsong - Response (200): annotate:title="About Damn Time",artist="Lizzo",duration="191.82",song_id="b08a6fcd37aa248cb0e824518c939003",media_id="7081",liq_amplify="-4.50dB",liq_cross_duration="1.50",liq_fade_out="1.50",liq_cue_in="0.20",liq_cue_out="188.70",playlist_id="56":media:Muziek/lizzo_-_about_damn_time.mp3
2022/05/04 11:00:28 [cross_0:3] Analysis: -38.213464dB / -20.760042dB (1.48s / 1.48s)
2022/05/04 11:00:28 [crossfade:3] Simple transition: crossed, fade-in, fade-out.
2022/05/04 11:00:28 [crossfade:3] cross duration: 5., after duration: -1.
2022/05/04 11:00:28 [clock.main:2] We must catchup 1.11 seconds!
2022/05/04 11:00:31 [clock.main:2] We must catchup 0.15 seconds!
[mp3float @ 0x7f8bc8553b00] Could not update timestamps for discarded samples.
2022/05/04 11:00:34 [decoder:2] Decoding "/var/azuracast/stations/REDACTED/media/Jingles/2020/000014fd.mp3" ended: Ffmpeg_decoder.End_of_file.
2022/05/04 11:00:35 [next_song:3] Prepared "/var/azuracast/stations/REDACTED/media/Muziek/lizzo_-_about_damn_time.mp3" (RID 0).
[mp3float @ 0x7f8bc8449180] Could not update timestamps for skipped samples.
2022/05/04 11:00:35 [cue_next_song:3] Cueing in...
2022/05/04 11:00:35 [lang:3] API nextsong - Sending POST request to 'http://127.0.0.1:9010/api/internal/1/liquidsoap/nextsong' with body: 
2022/05/04 11:00:35 [lang:3] API feedback - Sending POST request to 'http://127.0.0.1:9010/api/internal/1/liquidsoap/feedback' with body: {
2022/05/04 11:00:35 [lang:3]   "song_id": "b08a6fcd37aa248cb0e824518c939003",
2022/05/04 11:00:35 [lang:3]   "playlist_id": "56",
2022/05/04 11:00:35 [lang:3]   "media_id": "7081"
2022/05/04 11:00:35 [lang:3] }
2022/05/04 11:00:35 [lang:3] API nextsong - Response (200): annotate:title="Alone, Pt. II",artist="Alan Walker ft. Ava Max",duration="179.07",song_id="82fcbfcf932d700895f4e5511b348471",media_id="1399",liq_amplify="-6.70dB",liq_cross_duration="1.50",liq_fade_out="1.50",liq_cue_in="0.00",liq_cue_out="177.20",playlist_id="37":media:Muziek/Alan Walker - Alone, Pt. II.mp3
Incorrect BOM value
Error reading lyrics, skipped
2022/05/04 11:00:35 [lang:3] API feedback - Response (200): true
Incorrect BOM value
Error reading lyrics, skipped
2022/05/04 11:00:36 [cross_0:3] Analysis: -64.091019dB / -36.704803dB (1.48s / 1.48s)
2022/05/04 11:00:36 [crossfade:3] Simple transition: crossed, fade-in, fade-out.
2022/05/04 11:00:36 [crossfade:3] cross duration: 5., after duration: 191.82
2022/05/04 11:00:36 [clock.main:2] We must catchup 1.21 seconds!
2022/05/04 11:00:38 [clock.main:2] We must catchup 1.07 seconds!

sometimes it does not happen at all. (Yay, the most fun kind of bugs woot!) CleanShot 2022-05-04 at 11 07 33@2x

It no longer happens when disabling the mkpascal script. However, I am unsure how to debug this.

To Reproduce


# Functions / Modules --------------------->

# Audio Input --------------------->

mkpProcess = radio

# Processing Blocks --------------------->

# Gate
mkpProcess = ladspa.gate(mkpProcess, threshold = -60.0, attack = 0.15, hold = 1.0, decay = 200.0, range = -25.0)

# Wideband AGC + Pre-Processing
mkpProcess = normalize(target = 0., window = 0.03, gain_min = -16., gain_max = 0., mkpProcess)
mkpProcess = ladspa.sc4(rms_peak=0.3, attack_time = 0.5, release_time = 3., threshold_level = -36.0, ratio=1., makeup_gain = 6., mkpProcess)

# Stereo Expander
mkpProcess = ladspa.matrixspatialiser(width=16, mkpProcess)

# Bass EQ
mkpProcess = ladspa.tap_equalizer(band_1_freq=70., band_1_gain=4., mkpProcess)
mkpProcess = ladspa.tap_equalizer(band_1_freq=150., band_1_gain=-2., mkpProcess)

# 5 Bands Compress/Limit
mkpProcess = compress.multiband(mkpProcess, [
  {frequency=200., attack=3.5, release=30., ratio=3., threshold=-10., gain=2.},
  {frequency=1000., attack=2.25, release=40., ratio=2., threshold=-13., gain=2.},
  {frequency=3500., attack=2.25, release=40., ratio=3., threshold=-9., gain=2.},
  {frequency=6500., attack=2.25, release=60., ratio=2., threshold=-6., gain=1.5},
  {frequency=20000., attack=2.25, release=70., ratio=2., threshold=-4., gain=1.},
])

# 2 Bands Compress/Limit
mkpProcess = compress.multiband(mkpProcess, [
  {frequency=200., attack=10., release=30., ratio=2., threshold=-4., gain=0.},
  {frequency=20000., attack=10., release=40., ratio=2., threshold=-2., gain=-2.}
])

# De-esser
mkpProcess = ladspa.tap_deesser(threshold_level=-5., frequency=6000., mkpProcess)

# Final Limiter
mkpProcess = ladspa.tap_limiter(limit_level = -0.5, mkpProcess)

# Audio Output --------------------->
radio = mkpProcess

Expected behavior Metadata shouldn't be dropped.

Version details

  • OS: Ubuntu
  • Version 2.0.4 v2

Install method AzuraCast

bjarn avatar May 04 '22 13:05 bjarn