node-ytdl-core
node-ytdl-core copied to clipboard
How to detect when a live stream ends?
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!
🤔 that information might only be available via the m3u8 stream / dash mpd