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

Enhance srt output recovery #4399

Merged
merged 1 commit into from
Mar 12, 2025
Merged

Enhance srt output recovery #4399

merged 1 commit into from
Mar 12, 2025

Conversation

toots
Copy link
Member

@toots toots commented Mar 11, 2025

This PR enhances SRT behavior w.r.t. disconnections:

  • Properly stop encoder on disconnection. This makes sure that the next client gets a clean stream with potential initial headers.
  • Add connect/disconnect methods. Useful for programmatically manipulating SRT operators.
  • Add regression test using the previous methods.

It's worth noting that, for ogg encapsulation, some limitations will always happen. In particular, it is very difficult to have multiple receivers getting data from the same encoder.

It is technically possible and icecast does it, by keeping the last ogg packets headers in memory and sending them to the newly connected client but this is tricky, blurs the line between transport, encapsulation and codec.

Unless there is a serious need for it, this will probably not be implemented so SRT connections using ogg encapsulation should be using at most one connection.

Fixes: #4395

@toots toots changed the title Enhance srt output recovery: Enhance srt output recovery Mar 12, 2025
* Properly stop encoder on disconnection
* Add connect/disconnect methods
* Add test

Fixes: #4395
@toots toots enabled auto-merge March 12, 2025 17:07
@toots toots added this pull request to the merge queue Mar 12, 2025
Merged via the queue into main with commit 977e174 Mar 12, 2025
34 checks passed
@toots toots deleted the srt-reconnect branch March 12, 2025 17:32
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 this pull request may close these issues.

Bi-directional SRT disconnect breaks Opus stream synchronization, preventing reconnection
1 participant