Open aler9 opened 1 year ago
This would be a very desired feature for the video platform we are currently building. Any outlook on when this could be build in? Thanks !
Can you maybe give some pointers as to what you think is necessary to implement this (e.g. which files to edit)? Maybe I can give it a go
Hello, in my opinion to implement this you can hack formatprocessor.H264
, which is an object that is initialized once for every H264 track of every stream:
https://github.com/bluenviron/mediamtx/blob/main/internal/formatprocessor/h264.go
In this structure you have to save all NALUs in a buffer until a key frame is received; when a key frame is received, this buffer must be emptied, and filled with new NALUs starting from the key frame.
When a new RTSP, RTMP of WebRTC client connects (not HLS, since key frame caching is already present in HLS), you have to send to this client all NALUs that are present in the buffer.
want this feature to! I'm using video doorbell with this project, when doorbell event triggered, video showed up in about 3-4s. a gop cache will make the stream open in realtime.
thanks everyone in advance!!
I have a live stream, where I have multiple webcams in one single location (a zoo). I switch between them every 20 seconds. This feature would help make the switch quick and smooth.
Describe the feature
Discussed here #1132
NOTE: this feature is already present in HLS. It is missing in WebRTC, SRT, RTSP, RTMP.