question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

YouTube Streams occasionally stop with TrackEndEvent, despite still running on YT

See original GitHub issue

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:

04:27:41.565 [JDA RateLimit-Queue Pool - Thread 1] DEBUG net.dv8tion.jda.core.requests.Requester - Received response with following cf-rays: [41724f0fded02c3c-AMS]
04:27:42.120 [lava-daemon-pool-playback-1-thread-72] DEBUG com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack - Starting track from URL: https://r4---sn-25ge7nl6.googlevideo.com/videoplayback?ei=_Q3wWoSAJozh8gS-pZngBA&c=WEB&live=1&source=yt_live_broadcast&ms=lv&fexp=23724337&mt=1525681289&mv=u&id=o5_gXqpGoSY.2&requiressl=yes&mm=32&pl=20&mn=sn-25ge7nl6&hang=1&sparams=cmbypass%2Ccompress%2Cei%2Cgcr%2Cgir%2Chang%2Cid%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clive%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cnoclen%2Cpl%2Crequiressl%2Csource%2Cexpire&cmbypass=yes&gcr=us&ipbits=0&expire=1525703261&compress=yes&ip=redacted&mime=audio%2Fmp4&key=yt6&itag=140&signature=834FFE2C375CFF80BA07B37889BEC32466418D34.3A95CB05F967F176E483F13A93163D86683AFD0A&noclen=1&gir=yes&keepalive=yes
04:27:42.573 [lava-daemon-pool-playback-1-thread-72] DEBUG com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAudioTrack - Starting to play track with codec mp4a
04:27:42.574 [lava-daemon-pool-playback-1-thread-72] DEBUG com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAacTrackConsumer - Initialising AAC track with frequency 48000 and channel count 2.
04:41:10.991 [JDA MainWS-ReadThread] DEBUG net.dv8tion.jda.core.handle.EventCache - Received VOICE_STATE_UPDATE for a Member that has yet to be cached. JSON: {"self_deaf":false,"user_id":"413266707449249792","guild_id":"110373943822540800","deaf":false,"session_id":"a7afcd9339cdc277a94dbd50073b977e","mute":false,"suppress":false,"self_video":false,"self_mute":true,"channel_id":null}
05:08:36.616 [lava-daemon-pool-playback-1-thread-72] DEBUG com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor - Playing track o5_gXqpGoSY finished or was stopped.
05:08:36.616 [JDA AudioConnection Guild: 194794824371535873 Sending Thread] DEBUG com.sedmelluq.discord.lavaplayer.player.AudioPlayer - Firing an event with class TrackEndEvent
05:08:36.841 [JDA RateLimit-Queue Pool - Thread 3] DEBUG net.dv8tion.jda.core.requests.Requester - Received response with following cf-rays: [41728b017e029cb3-AMS]

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

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Bacon1661commented, May 14, 2018

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.

0reactions
SoulSencommented, May 16, 2019

Any update on fixes for this, or is it still being experienced?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot your YouTube live stream - Google Help
To fix it, get a new stream key in Live Control Room and update your encoder. Go to YouTube Studio. To open Live...
Read more >
[Update: Dec. 14] YouTube bugs/issues & pending ...
Here we are tracking all the bugs and problems found on YouTube and their status as well as any pending improvements that are...
Read more >
Youtube outages reported in the last 24 hours - Downdetector
Are you also having issues? Select the option you are having issues with, and help provide feedback to the service. Video Streaming App...
Read more >
10 Things to Know About YouTube Copyright Rules - dummies
YouTube takes copyright infringement seriously, so if you upload videos there, you should take it seriously, too. Here's what to know.
Read more >
20 YouTube Tricks, Hacks, and Features You'll Want to Know ...
Live stream videos to YouTube. Upload and watch videos in 360 degrees and VR. Watch for a new YouTube ads algorithm. Remove ads...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found