-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Cache H264 GOPs in order to allow readers to decode frames immediately #1209
Comments
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 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. |
In my opinion, this is a very useful feature that will allow the mediamtx to be used in video surveillance projects. I'm eagerly awaiting its implementation! |
Thank you for highlighting this issue! We’re actively working on a fix and have successfully gotten the RTSP path working so far. We’re continuing to refine the solution and will contribute the fix to the repository once it’s ready. We appreciate your patience and look forward to improving this together! |
Describe the feature
Discussed here #1132
NOTE: this feature is already present in HLS. It is missing in WebRTC, SRT, RTSP, RTMP.
The text was updated successfully, but these errors were encountered: