# Playback (Audio) Stops in the middle of tracks

**URL:** <https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258>\
**Category:** Get Help\
**Created:** [March 7, 2019, 12:21pm UTC](https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258 "2019-03-07T12:21:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![maydo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/maydo/32/122_2.png) [@maydo](https://discourse.libretime.org/u/maydo)\
**Post date:** [March 7, 2019, 12:21pm UTC](https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258/1 "2019-03-07T12:21:31Z")

</div>

hi,

almost each second track stops audio somewhere in the middle.  
no audio output, but playback and stream keeps going  
until next track,  
on next track audio starts again.

any ideas ?  
maybe it has something todo with the silan issue

btw this happens not always, but when issue starts, the whole machine needs to be rebooted to fix.

after some time of watching, the issue starts after 30min after reboot, so its something like a buffer issue  
not sure how to debug.

also i dont think its icecast issue, couse LT is streaming 2 streams, one to icecast and second to shoutcast  
same on both, so maybe liquidsoap

---

<div class="post-metadata">

**Author:** ![robbt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/robbt/32/15_2.png) [@robbt](https://discourse.libretime.org/u/robbt)\
**Post date:** [March 7, 2019, 2:29pm UTC](https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258/2 "2019-03-07T14:29:27Z")

</div>

Ok, so this is consistently happening to you ? Is it always the same tracks ? Is it possible that the tracks were cut off and are shorter then the system thinks they are ? Download the track and open it directly with a MP3 player. WE have seen something like this happen rather sporadically vs. consistently so it has been hard to diagnose. Check your pypo.log and liquidsoap log and see if you see any errors.

---

<div class="post-metadata">

**Author:** ![maydo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/maydo/32/122_2.png) [@maydo](https://discourse.libretime.org/u/maydo)\
**Post date:** [March 7, 2019, 5:39pm UTC](https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258/3 "2019-03-07T17:39:34Z")

</div>

i have checked the files many times they are ok. its not same tracks  
files cue in and out also correct

its not consistently, it happens randomly.  
but when it starts it repeats same behavior until reboot

just tailing pypo.log will check it.

cant find any liquidsoap.log  
also /var/log/liquidsoap is empty  
just find this when locating “liquidsoap.log”  
~/libretime/python\_apps/pypo/liquidsoap/airtime-liquidsoap.logrotate

---

<div class="post-metadata">

**Author:** ![maydo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/maydo/32/122_2.png) [@maydo](https://discourse.libretime.org/u/maydo)\
**Post date:** [March 8, 2019, 10:27am UTC](https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258/4 "2019-03-08T10:27:27Z")

</div>

> Blockquote  
> 2019-03-08 10:17:54,455 [pypofetch] [INFO] File ‘/var/tmp/airtime/pypo/cache/scheduler/324.mp3’ removed  
> 2019-03-08 10:17:54,571 [pypofetch] [INFO] File ‘/var/tmp/airtime/pypo/cache/scheduler/409.mp3’ removed  
> 2019-03-08 10:17:54,575 [pypofetch] [INFO] Loop #260  
> 19-03-08 10:25:56,637 [pypofetch] [INFO] Handling command: update\_schedule  
> 2019-03-08 10:25:56,662 [pypoliquidsoap] [INFO] Need to remove items from Liquidsoap: set([3147])  
> 2019-03-08 10:25:56,663 [pypofetch] [INFO] New timeout: 480  
> 2019-03-08 10:25:56,666 [pypofetch] [INFO] Loop #262  
> 2019-03-08 10:25:56,674 [pypoliquidsoap] [INFO] Need to add items to Liquidsoap _now_: set([3146])  
> 19-03-08 10:33:57,051 [pypoliqqueue] [INFO] waiting 44.948878s until next scheduled item  
> 2019-03-08 10:33:57,098 [pypofetch] [INFO] File ‘/var/tmp/airtime/pypo/cache/scheduler/32.mp3’ removed  
> 2019-03-08 10:33:57,193 [pypofetch] [INFO] File ‘/var/tmp/airtime/pypo/cache/scheduler/302.mp3’ removed  
> 2019-03-08 10:33:57,194 [pypofetch] [INFO] Loop #263

there is always The “Loop” Entries in pypo.log when audio fails or better explained, its like putting silence in the rest of the current playing track until next track

i just see there was some permission problems, but i think its not permission issue.  
same track plays fine next time

19-03-08 10:41:57,196 [pypofetch] [INFO] Queue timeout. Fetching schedule manually

there is also this entry before the Loop entry

---

<div class="post-metadata">

**Author:** ![maydo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/maydo/32/122_2.png) [@maydo](https://discourse.libretime.org/u/maydo)\
**Post date:** [March 8, 2019, 4:14pm UTC](https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258/5 "2019-03-08T16:14:59Z")

</div>

btw just find out that same happens while moving any track in scheduled list  
same entries in pypo.log and silence

i have long scheduled shows, just 2 shows for 24h  
the longer one has 16h playtime  
maybe it has todo something with it  
i see in pypo.log it loads whole list each time there is something changed

---

<div class="post-metadata">

**Author:** ![maydo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/maydo/32/122_2.png) [@maydo](https://discourse.libretime.org/u/maydo)\
**Post date:** [March 9, 2019, 6:06pm UTC](https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258/6 "2019-03-09T18:06:52Z")

</div>

2019/03/09 19:01:35 [schedule\_noise\_switch:3] Switch to map\_metadata\_5852 with transition.  
2019/03/09 19:01:35 [lang:3] transition called…  
2019/03/09 19:01:35 [lang:3] vars.show\_name  
2019/03/09 19:01:35 [server:3] Client localhost.localdomain disconnected.  
2019/03/09 19:01:35 [switch\_5850:3] Switch to insert\_metadata\_5836.  
2019/03/09 19:01:35 [amplify\_5721:3] Overriding amplification: 0.891251.  
2019/03/09 19:01:35 [lang:3] timeout --signal=KILL 45 pyponotify --media-id=4289 &  
2019/03/09 19:01:35 [lang:3] Using stream\_format 0

these entrys in  
/var/log/airtime/pypo-liquidsoap/ls\_script.log

some more logs

2019/03/09 19:06:46 [server:3] Client localhost.localdomain disconnected.  
2019/03/09 19:06:46 [amplify\_5781:3] Overriding amplification: 0.456037.  
2019/03/09 19:06:46 [lang:3] timeout --signal=KILL 45 pyponotify --media-id=4290 &  
2019/03/09 19:06:46 [lang:3] Using stream\_format 0  
2019/03/09 19:06:46 [lang:3] Using stream\_format 0  
2019/03/09 19:06:46 [lang:3] Using stream\_format 0  
2019/03/09 19:06:48 [cue\_cut\_5717:3] Cueing out…  
2019/03/09 19:06:48 [s0:3] Finished with “/var/tmp/airtime/pypo/cache/scheduler/722.mp3”.  
2019/03/09 19:06:48 [amplify\_5721:3] End of the current overriding.  
2019/03/09 19:06:48 [cross\_5724:3] No next track ready yet.  
2019/03/09 19:09:11 [server:3] New client: localhost.localdomain.  
2019/03/09 19:09:11 [lang:3] dynamic\_source.get\_id  
2019/03/09 19:09:11 [server:3] Client localhost.localdomain disconnected.  
2019/03/09 19:09:11 [s4:3] Finished with “/var/tmp/airtime/pypo/cache/scheduler/5.mp3”.  
2019/03/09 19:09:11 [cue\_cut\_5777:3] End of track before cue-out point.  
2019/03/09 19:09:11 [amplify\_5781:3] End of the current overriding.  
2019/03/09 19:09:11 [schedule\_noise\_switch:3] Switch to map\_metadata\_5859 with forgetful transition.  
2019/03/09 19:09:11 [lang:3] transition called…  
2019/03/09 19:09:11 [dummy(dot)4:3] Source failed (no more tracks) stopping output…  
2019/03/09 19:09:11 [dummy(dot)3:3] Source failed (no more tracks) stopping output…

---

<div class="post-metadata">

**Author:** ![robbt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/robbt/32/15_2.png) [@robbt](https://discourse.libretime.org/u/robbt)\
**Post date:** [March 10, 2019, 3:02pm UTC](https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258/7 "2019-03-10T15:02:04Z")

</div>

Quick question, are you generally adding tracks to an ongoing show when this happens or is your show schedule setup completely ahead of time. From what I see it seems like you are modifying an ongoing show.

LibreTime wasn’t really programmed well to handle changes to a ongoing show. There are definitely some bugs in the airtime-playout python script. While I would love to get to the bottom of this the easiest workaround is to avoid modifying shows while they are playing and instead partition your shows into blocks where you can do most of your edits before the show starts airing.

I think that Airtime didn’t even allow you to modify a show at all once it was playing and LibreTime (or the saas-dev branch that became airtime.pro that we based LibreTime off of) added this capability but it hasn’t been fully vetted and I think we should discourage people from doing this until we can pinpoint what is causing the bug you are experiencing.

See this [githug bug](https://github.com/LibreTime/libretime/issues/232) for my first attempt to document this error. You can feel free to contribute info there.

So if you dont have a lot of desire to troubleshoot the python airtime-playout and airtime-liquidsoap configuration I’d suggest trying to break your shows up into smaller segments and see if you can fix it that way.

Otherwise if you can document a set of steps that consistently causes this error and post it in that github issue along with logs will make it a LOT easier for someone with more python knowledge to fix the problem. If you know enough python to figure it out feel free to go at it.

---

<div class="post-metadata">

**Author:** ![maydo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/maydo/32/122_2.png) [@maydo](https://discourse.libretime.org/u/maydo)\
**Post date:** [March 11, 2019, 12:14am UTC](https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258/8 "2019-03-11T00:14:42Z")

</div>

hi thank you for this information

i see that issue on github, im trying to figure out since days

also i found an old issue, its also related to that i think

> <https://github.com/savonet/liquidsoap/issues/66>

currently i have no more ideas on that 🙂  
but it is really annoying when you get dead air, for 1 minute or more

btw, the shows are been auto generated by smart blocks, so im not adding or moving tracks  
but i can say it has something todo with that, couse when you move, add or delete tracks on ongoing shows, this happens constantly

---

<div class="post-metadata">

**Author:** ![robbt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/robbt/32/15_2.png) [@robbt](https://discourse.libretime.org/u/robbt)\
**Post date:** [March 11, 2019, 12:42pm UTC](https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258/9 "2019-03-11T12:42:43Z")

</div>

So does the dead air usually go away by itself without you rebooting after a minute or so ?

---

<div class="post-metadata">

**Author:** ![maydo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/maydo/32/122_2.png) [@maydo](https://discourse.libretime.org/u/maydo)\
**Post date:** [March 11, 2019, 12:53pm UTC](https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258/10 "2019-03-11T12:53:19Z")

</div>

silence starts always in the middle of current playing track until next track  
next track starts normal with audiosignal

---

<div class="post-metadata">

**Author:** ![xabispacebiker](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/xabispacebiker/32/24_2.png) [@xabispacebiker](https://discourse.libretime.org/u/xabispacebiker)\
**Post date:** [August 26, 2021, 12:08am UTC](https://discourse.libretime.org/t/playback-audio-stops-in-the-middle-of-tracks/258/11 "2021-08-26T00:08:56Z")

</div>

Check this issue on github [Tracks longer than 55 minutes change status to "offline" · Issue #1275 · LibreTime/libretime · GitHub](https://github.com/LibreTime/libretime/issues/1275)
