Closed art1c0 closed 3 years ago
It seems that it has something to do with the "default_duration" param. If this parameter is insreased - issue is not reproducing. Maybe the issue only appears when "length" is more than "default_duration" ?
How are those tracks fed to the streaming system? I think we'd need more info about your script to be able to help. This could be a normal behavior actually depending how your script is setup.
Tracks are coming via curl from a web service:
playlist = request.dynamic(default_duration=120., length = 60., { request.create(list.hd(get_process_lines("curl http://127.0.0.1:8102/rpc/next"))) })
playlist = audio_to_stereo(playlist)
playlist = amplify(1., override = "replay_gain", playlist)
playlist = crossfade(start_next = 5., fade_in = 5., fade_out = 5., playlist)
def update_title(m) = [ ("artist", get_process_output("curl http://127.0.0.1:8102/rpc/meta")), ("title", "Radio") ] end
playlist = map_metadata(update_title, playlist)
Hey! I haven't forgotten about this issue. I'll get to it when I have a moment.
Hi all. @articobandurini, is the issue still occurring? If so, could you share a bit of your script? I haven't been able to reproduce locally so far.
Hi @articobandurini! I'm looking at this one now. One thing that seem important to notice in the logs is that the same file is played twice but with different request IDs. That would seem to indicate that the file got pushed through the streaming pipeline twice. Could it be possible that the api call in request.dynamic
could return the same file twice?
Also, any chance you could provide log extracts around the double play? And make sure that you're using the latest 1.4.0-rc1
or later. Thanks!!
I just upgraded to 1.4.0 official and I'm now experiencing this same problem. It was working back during commit 49372f48 (around July 22nd).
Here's the log output:
2019/10/21 15:16:07 [change_meta:3] Request ID: "52306"
2019/10/21 15:16:07 [change_meta:3] Artist: Koichi Sugiyama -- Game: Dragon Quest IV: The Guided Ones -- Title: Menuet
2019/10/21 15:16:07 [just_played:3] Just played request ID: "52306"
2019/10/21 15:16:08 [cross_8633:3] Analysis: -25.911881dB / -24.882155dB (4.96s / 4.96s)
2019/10/21 15:16:08 [smart_cross:3] Transition: crossed, fade-in, fade-out.
2019/10/21 15:16:08 [next_song:3] "annotate:req_id=\"52307\",type=\"S\",artist=\"Yoko Shimomura\",title=\"Mystic City Geo\",game=\"Legend of Mana\",replay_gain=\"-5.43 dB\":s3://xxxxx.flac"
2019/10/21 15:16:09 [decoder:3] Method "FLAC" accepted "/tmp/liq-process6205b7.flac".
2019/10/21 15:18:51 [next_song:3] "annotate:req_id=\"52307\",type=\"S\",artist=\"Yoko Shimomura\",title=\"Mystic City Geo\",game=\"Legend of Mana\",replay_gain=\"-5.43 dB\":s3://xxxxx.flac"
2019/10/21 15:18:52 [decoder:3] Method "FLAC" accepted "/tmp/liq-processba6b3e.flac".
2019/10/21 15:19:01 [main:3] Prepared "/tmp/liq-process6205b7.flac" (RID 2).
2019/10/21 15:19:01 [change_meta:3] Request ID: "52307"
2019/10/21 15:19:01 [change_meta:3] Artist: Yoko Shimomura -- Game: Legend of Mana -- Title: Mystic City Geo
2019/10/21 15:19:01 [just_played:3] Just played request ID: "52307"
2019/10/21 15:19:02 [cross_8633:3] Analysis: -168.916294dB / -31.498839dB (4.96s / 4.96s)
2019/10/21 15:19:02 [smart_cross:3] new >= old + margin, old <= medium and new <= high.
2019/10/21 15:19:02 [smart_cross:3] Do not fade if it's already very low.
2019/10/21 15:19:02 [smart_cross:3] Transition: crossed, no fade.
2019/10/21 15:21:23 [next_song:3] "annotate:req_id=\"52308\",type=\"S\",artist=\"Ryuichi Takada\",title=\"Armed Hometown\",game=\"Ace Combat 6: Fires of Liberation\",replay_gain=\"+0.66 dB\":s3://xxxxx.flac"
2019/10/21 15:21:24 [decoder:3] Method "FLAC" accepted "/tmp/liq-processab5b45.flac".
2019/10/21 15:21:32 [main:3] Prepared "/tmp/liq-processba6b3e.flac" (RID 3).
2019/10/21 15:21:32 [change_meta:3] Request ID: "52307"
2019/10/21 15:21:32 [change_meta:3] Artist: Yoko Shimomura -- Game: Legend of Mana -- Title: Mystic City Geo
2019/10/21 15:21:32 [just_played:3] Just played request ID: "52307"
2019/10/21 15:21:33 [cross_8633:3] Analysis: -101.755199dB / -31.498839dB (4.96s / 4.96s)
2019/10/21 15:21:33 [smart_cross:3] new >= old + margin, old <= medium and new <= high.
2019/10/21 15:21:33 [smart_cross:3] Do not fade if it's already very low.
2019/10/21 15:21:33 [smart_cross:3] Transition: crossed, no fade.
2019/10/21 15:23:54 [next_song:3] "annotate:req_id=\"52308\",type=\"S\",artist=\"Ryuichi Takada\",title=\"Armed Hometown\",game=\"Ace Combat 6: Fires of Liberation\",replay_gain=\"+0.66 dB\":s3://xxxxx.flac"
My config can be seen here: https://github.com/savonet/liquidsoap/issues/865#issuecomment-508767754
Edit: Can also confirm that bumping "default_duration" and "length" to higher values fixes the issue for now.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This should be fixed with the new prefetch
parameter.
In my setup I have to use the
length
parameter forrequest.dynamic
, otherwise long tracks (about 60 minutes) are getting prepared too late (actually they need about 45 seconds to prepare).If I set "length" value to 30 seconds it works well, but if I try to increase (tried 60, 45, even 35) - strange thing is happening. According to the log, I can clearly see that the first track right after liquidsoap start is being "accepted" two times, and then it also plays two times in a row:
then it gets prepared:
and then eventually finished, but immediately prepared again (skipping "accepted" phase):
This is unexpected and undesired behavior, as airplay gets un-synced with the playlist. How to fix this?
Liquidsoap 1.2.1 / Ubuntu 16