Skip to content

What is best way to deal with client network errors? #239

Answered by aler9
Olex1313 asked this question in Questions
Discussion options

You must be logged in to vote

Hello, this task is difficult since it involves creating a continuous and coherent H264 stream (assuming your camera uses H264 as its video codec). The RTSP protocol only implements the outer layer that wraps the H264 stream. When a camera disconnects, the H264 stream goes missing and it's impossible to recreate it or insert frames in between.

The easiest way i can think of implementing this consists in:

  1. Connect to the stream, start decoding H264 access units:
    https://github.com/bluenviron/gortsplib/blob/main/examples/client-read-format-h264/main.go

  2. Create a server that encodes the H264 access units and makes them available to any client:
    https://github.com/bluenviron/gortsplib/blob/m…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Olex1313
Comment options

Answer selected by Olex1313
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #231 on April 10, 2023 12:46.