RTP to HLS Disconnect and Reconnect Audio Stream

Hello everyone,

I currently have a microphone input which is sending UDP to a server and into a RTP input and finally streaming over HLS. The entire flow is working fine, however, I am trying to handle a scenario where the microphone gets disconnected and when it reconnects and starts sending UDP packets over to the server, I start receiving:

Since the sequence numbers are out of sync. I was wondering what is the best scenario to handle this case? Ideally I would like the sequence number to continue from where the microphone got disconnected and this can then continue generating segment files for HLS streaming. The code structure is very similar to https://github.com/membraneframework/membrane_demo/blob/master/rtp_to_hls/rtp_to_hls.exs.

Any help would be appreciated!

1 response