-
Notifications
You must be signed in to change notification settings - Fork 61
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
keep publish segment file to cloud even source stream dropped #105
Conversation
hey @khmak3, can you describe the scenario/problem that this addresses? If a participant leaves, we would normally want a track/track composite egress to end (explicit egress stop is not required) |
This code diff address following cases when participant share video, and there are egress track on that video
For second case, I believe the egress end/complete due to error stream is better than fail. This may introduce behavior different from egress track with container. Since some of the container packetization may fail for video access unit with error. |
After introduce multiqueue, there are some case for my diff can't handle. I will add some more to handle those |
@frostbyte73 PR updated to incorporate multi queue pipeline frozen case |
@khmak3 thanks for the update. From your scenarios I think this means there's something wrong with our appsrc or appwriter (they shouldn't be disconnecting that quickly), and it should definitely be able to handle 0.001% packet loss. I'll be able to dig in more tomorrow |
I don't think likekit code has something wrong for 0.001% error. Percent is not an issue for video codec. Just 1 packet dropped at i frame with information about resolution. It will trigger error inside Video es parser in gstreamer webmux plug-in. The parser think resolution change and webm can't encapsulate the file. So, It will throw error. In previous egress code will treat those as fatal error and failed the job (throw away the egress file). I think we should keep publish the file (even with error). User may fix it (crop the error part) afterward. |
If that's the case, this should already be fixed in v1.4.1 - can you see if you can reproduce it on the latest version? |
After update to 1.4.1, the issue introduced by error stream gone. :) |
@frostbyte73 Hi, Any concern for this PR? Or LiveKit wants egress job fail when participant drop? |
I think this is very helpful. Now I use livekit-egress for creating HLS stream, for viewers (one to many stream), and when streamer lose connection (refresh page), egress ended, if I create new egress, when streamer gets the connection back, chunks start writing from the first index (new chunks overwrite old), also playlist reset too. So stream history lost. |
This should be fixed in our sdk and gstreamer in v1.4.2 |
I've try v1.4.2
And this code diff still fix |
I have the same issue with LiveKit Cloud. Could you please help to solve it? |
I use livekit egress on own server so i create own build of egress, in which change logic of appending new HLS segmenets to playlist. Egress check if playlist exists in current folder and if it exists egress does not create new playlist, but appends new segments to current. So if egress crash i run new. In you issue #160 you said that, RoomCompositeEgressRequest works correctly, do you have one streamer or many ? In my case i have one streamer and when he diconnect egress stops. |
I have only one streamer, and if he manually stops streaming, yes egress stops, but if he has some temporary problems (network etc) egress is waiting for him to return |
Keep Publish egress output for any source disconnect.
Also change state to completed instead Active state