node-ytdl-core icon indicating copy to clipboard operation
node-ytdl-core copied to clipboard

How to detect when a live stream ends?

Open LinkTree3 opened this issue 4 years ago • 1 comments

Hey just wanted to ask here first if there is any standard quick way to detect when a youtube live stream ends?

What I tried was to check if there hasn't been any new frames received in the past 30 seconds and if so it attempts to restart the stream and check if it is live(through formats) the problem is that the formats return live even when the stream has ended a long time ago so it just keeps on downloading the same video over and over again. So checking through formats is not a good solution.

Thank you!

LinkTree3 avatar Sep 13 '21 14:09 LinkTree3

🤔 that information might only be available via the m3u8 stream / dash mpd

TimeForANinja avatar Oct 17 '21 03:10 TimeForANinja