Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live stream end not detected #594

Open
qwer-lives opened this issue Jan 21, 2025 · 9 comments · May be fixed by #601
Open

Live stream end not detected #594

qwer-lives opened this issue Jan 21, 2025 · 9 comments · May be fixed by #601

Comments

@qwer-lives
Copy link

I have found this to always happen for live playlists that include a bunch of segments besides the most recent ones.

For example, lives from weverse.io have an m3u8 that includes all the segments from the start of the livestream (to allow rewinding). When I try to download these type of streams, N_m3u8DL-RE keeps refreshing the playlist forever, even after the livestream has already ended (I can see the playlist has #EXT-X-ENDLIST at the end after the livestream actually ends, so N_m3u8DL-RE should be able to detect that it ended). Instead it stays in this state where it never finishes nor muxes anything.

If I try to download these playlists after the live has ended, then they get downloaded as a VOD (the playlist basically contains all the segments already) and it finishes without a problem. This means I have to do a very hacky workaround where I wait for a livestream to finish before downloading it in order for it to work.

@qwer-lives
Copy link
Author

qwer-lives commented Jan 22, 2025

As an example, here's the m3u8 that I got from a livestream at weverse.io (renamed to .txt because of github policies):

Master playlist
Video playlist at the middle of the livestream (when I started recording)
Video playlist after the live ended

As you can see, after the livestream ends the playlist gets correctly updated with the #EXT-X-ENDLIST tag, but N_m3u8DL-RE didn't stop recording after seeing this. It's still trying to refresh the playlist forever, I had to manually kill it and then manually merge and mux the segments.

@qwer-lives qwer-lives linked a pull request Jan 31, 2025 that will close this issue
@sn-o-w
Copy link

sn-o-w commented Feb 12, 2025

@qwer-lives Some time ago, I reported some issue that looks similar to some extent: #409

At least this part "Instead it stays in this state where it never finishes nor muxes anything."

I'm curious at this point if your PR helps with my issue, too. 🤔

@qwer-lives
Copy link
Author

It's possible but I'm not 100% sure if it will help. In my PR I mark the blocks as completed when the time limit is reached too, they weren't marked as completed before which IMHO is a bug. But since the whole thing is cancelled when the time limit is reached it shouldn't get stuck currently anyway...

You can try and see what happens :)

@sn-o-w
Copy link

sn-o-w commented Feb 12, 2025

It's possible but I'm not 100% sure if it will help. In my PR I mark the blocks as completed when the time limit is reached too, they weren't marked as completed before which IMHO is a bug. But since the whole thing is cancelled when the time limit is reached it shouldn't get stuck currently anyway...

You can try and see what happens :)

In the last hour, I've tried to create a build via GitHub Actions, but it looks like something has changed drastically, and the build fails with 2 errors. I have no idea how to fix it in order to at least create a build. ☹️

@qwer-lives
Copy link
Author

It's possible but I'm not 100% sure if it will help. In my PR I mark the blocks as completed when the time limit is reached too, they weren't marked as completed before which IMHO is a bug. But since the whole thing is cancelled when the time limit is reached it shouldn't get stuck currently anyway...
You can try and see what happens :)

In the last hour, I've tried to create a build via GitHub Actions, but it looks like something has changed drastically, and the build fails with 2 errors. I have no idea how to fix it in order to at least create a build. ☹️

I just build it locally with dotnet publish N_m3u8DL-RE from the root of the repo.

@sn-o-w
Copy link

sn-o-w commented Feb 13, 2025

It's possible but I'm not 100% sure if it will help. In my PR I mark the blocks as completed when the time limit is reached too, they weren't marked as completed before which IMHO is a bug. But since the whole thing is cancelled when the time limit is reached it shouldn't get stuck currently anyway...
You can try and see what happens :)

In the last hour, I've tried to create a build via GitHub Actions, but it looks like something has changed drastically, and the build fails with 2 errors. I have no idea how to fix it in order to at least create a build. ☹️

I just build it locally with dotnet publish N_m3u8DL-RE from the root of the repo.

Mind share the Windows build? 🤔

@qwer-lives
Copy link
Author

qwer-lives commented Feb 13, 2025

Mind share the Windows build? 🤔

I only have a Linux machine so I can't build it for Windows unfortunately :(

@sn-o-w
Copy link

sn-o-w commented Feb 13, 2025

Mind share the Windows build? 🤔

I only have a Linux machine so I can't build it for Windows unfortunately :(

Hmmm, then share the Linux build? 🤔

@qwer-lives
Copy link
Author

I created a release in my fork with this fix (and some others) here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants