Open MCOfficer opened 6 years ago
I have this same exact issue. YouTube live streams have always been super finicky for me; Often having long pauses where it seems it's buffering or something and I don't get this with anything else. An hour ago I had this REALLY strange occurrence where the live stream paused for five seconds and started spam adding the live stream (Which this has never ever happened before) and spat out this error:
[22:13:51] [ ERROR] [LocalAudioTrackExecutor] Error in playback of LsBrT6vbQa8
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something went wrong when decoding the track.
at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:40)
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.executeProcessingLoop(LocalAudioTrackExecutor.java:260)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.process(YoutubeMpegStreamAudioTrack.java:53)
at com.sedmelluq.discord.lavaplayer.track.DelegatedAudioTrack.processDelegate(DelegatedAudioTrack.java:27)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.processStream(YoutubeAudioTrack.java:87)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.process(YoutubeAudioTrack.java:65)
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:90)
at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$1(DefaultAudioPlayerManager.java:357)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Not success status code: 204
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.validateStatusCode(PersistentHttpStream.java:80)
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.attemptConnect(PersistentHttpStream.java:109)
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.connect(PersistentHttpStream.java:98)
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.internalRead(PersistentHttpStream.java:141)
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.internalRead(PersistentHttpStream.java:151)
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.read(PersistentHttpStream.java:157)
at com.sedmelluq.discord.lavaplayer.container.mpeg.reader.MpegReader.tryReadInt(MpegReader.java:133)
at com.sedmelluq.discord.lavaplayer.container.mpeg.reader.MpegReader.nextChild(MpegReader.java:53)
at com.sedmelluq.discord.lavaplayer.container.mpeg.reader.fragmented.MpegFragmentedFileTrackProvider.provideFrames(MpegFragmentedFileTrackProvider.java:53)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.processSegmentStream(YoutubeMpegStreamAudioTrack.java:110)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.processNextSegment(YoutubeMpegStreamAudioTrack.java:87)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.execute(YoutubeMpegStreamAudioTrack.java:63)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.lambda$process$0(YoutubeMpegStreamAudioTrack.java:54)
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.executeProcessingLoop(LocalAudioTrackExecutor.java:248)
... 9 common frames omitted
Using the above livestream as an example, here's a verbose dump of the MPEG-DASH manifest using youtube-dl: https://gist.github.com/shikhir-arora/900a3fd4fb90943beeec3dcf36ba1a10
All show an expiration of 1526203888
, which 05/13/2018 @ 9:31am (UTC) (about 6 hours from now).
roughly two hours later, and the expiration has been updated to 1526211794
(11:43am). apparently youtube always keeps the expiration 6 hours ahead. good idea, i'm not sure if lavaplayer checks for that or just takes the inital expiration.
(full dump: https://gist.github.com/MCOfficer/4f7d42869af6b1a1f5d8e1d5e078fa0a, thank windows for the missing line endings)
Here's the last bit of output from ffmpeg (before I force-quit); this is using verbose mode on the same stream. I let it run for a while. https://gist.github.com/shikhir-arora/5edee567fcab79cd26c29e28c1459fb8#file-ffmpeg_out-sh-L55 At line 55 there, ffmpeg did have an error in the pull function (notice a few messages before that it also seems to handle repeating messages).
However, it resumed back as usual as shown.
So apparently this is an issue with the live stream itself. I was playing the live stream on my bot while playing it in my browser and the live stream on both my bot and the website stopped. They even mention in chat they're having problems with their live stream.
When the live stream is at fault I get this error:
[11:04:43] [ WARN ] [EventEmitter] lofi hip hop radio 24/7 ? chill study / relax / gaming beats got stuck! Threshold surpassed: 10000
Hmm, I tried a different stream and I'm still having live streams end prematurely even though it's continuing to play in YouTube. I even got a new error:
[11:55:10] [ ERROR] [LocalAudioTrackExecutor] Error in playback of ilxhlnDo7_M
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something went wrong when decoding the track.
at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:40)
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.executeProcessingLoop(LocalAudioTrackExecutor.java:260)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.process(YoutubeMpegStreamAudioTrack.java:53)
at com.sedmelluq.discord.lavaplayer.track.DelegatedAudioTrack.processDelegate(DelegatedAudioTrack.java:27)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.processStream(YoutubeAudioTrack.java:87)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.process(YoutubeAudioTrack.java:65)
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:90)
at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$1(DefaultAudioPlayerManager.java:357)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: org.apache.http.ConnectionClosedException: Premature end of chunk coded message body: closing chunk expected
at com.sedmelluq.discord.lavaplayer.container.mpeg.reader.MpegReader.nextChild(MpegReader.java:62)
at com.sedmelluq.discord.lavaplayer.container.mpeg.reader.fragmented.MpegFragmentedFileTrackProvider.provideFrames(MpegFragmentedFileTrackProvider.java:53)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.processSegmentStream(YoutubeMpegStreamAudioTrack.java:110)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.processNextSegment(YoutubeMpegStreamAudioTrack.java:87)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.execute(YoutubeMpegStreamAudioTrack.java:63)
at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.lambda$process$0(YoutubeMpegStreamAudioTrack.java:54)
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.executeProcessingLoop(LocalAudioTrackExecutor.java:248)
... 9 common frames omitted
Caused by: org.apache.http.ConnectionClosedException: Premature end of chunk coded message body: closing chunk expected
at org.apache.http.impl.io.ChunkedInputStream.getChunkSize(ChunkedInputStream.java:266)
at org.apache.http.impl.io.ChunkedInputStream.nextChunk(ChunkedInputStream.java:225)
at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:184)
at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
at java.util.zip.InflaterInputStream.fill(Unknown Source)
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.util.zip.GZIPInputStream.read(Unknown Source)
at org.apache.http.client.entity.LazyDecompressingInputStream.read(LazyDecompressingInputStream.java:70)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.internalRead(PersistentHttpStream.java:144)
at com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream.read(PersistentHttpStream.java:157)
at com.sedmelluq.discord.lavaplayer.container.mpeg.reader.MpegReader.tryReadInt(MpegReader.java:133)
at com.sedmelluq.discord.lavaplayer.container.mpeg.reader.MpegReader.nextChild(MpegReader.java:53)
... 15 common frames omitted
respectfully, to me it seems like you are having a different issue. youtube streams seem to be causing problems in general
I have the same issue, but I also have a lot of additional issues lol.
there's a massive difference between randomly ending the track without exception and failing to decode it, so unless i'm wrong by a mile you're hijacking this issue.
That's not what I'm intending to do at all, and I'm sorry if I conveyed that. I still have the original issue you mentioned, I'm just reporting additional issues.
Can confirm i'm having the same issue. This is the livestream: https://youtu.be/HU1_KTNSj7k The stream just randomly stops constantly.
Any update on fixes for this, or is it still being experienced?
I've brought this up on discord before, but i wanted to make sure it's "conserved" here in case anyone has the same problem.
I run a Bot that is supposed to play livestreams 24/7. Every few hours, a TrackEndEvent will happen, despite the actual stream on YouTube still being up & running.
This seems to be independant of the stream, or the machine i host on. I couldn't find anything unusual (like a short loss of connection) in the logs either. The only thing all these streams have in common is being hosted on YouTube. The Audiobuffer size doesn't seem to affect the frequency of these events.
Example log:
sedmelluq already fixed an issue with the same symptoms for Twitch streams, but i've been told that YouTube works completely different.
Either way, i wanted to put this out there, in case anyone has an idea.
Edit: after 1 day of testing i can confirm that this still happens with 1.3.10