zoneminder
zoneminder copied to clipboard
Unable to encode MPEG stream due to `EAGAIN` returned by `avcodec_receive_packet`
Describe Your Environment
- Version of ZoneMinder: Commit 1ae223bfc1887186d9e7f0cb85161f588ec0dc96
- How you installed ZoneMinder: A lightly modified version of the nixpkgs package for the given commit
- NixOS Vicuna 24.11
- Browser name and version: Librewolf 128
Describe the bug When attempting the view an MPEG stream through the web interface, the stream loads indefinetely and the attached errors are printed to the debug log.
To Reproduce This has been reproduces on a system with an NVidia T400 GPU intended for hardware decoding and encoding.
- Enable MPEG streaming
- Set these settings:
MPEG_LIVE_FORMAT=webm(also seems reproducable with mp4 here)MPEG_REPLAY_FORMAT=webmFFMPEG_INPUT_OPTIONS=-nostdin -err_detect aggressive -fflags discardcorrupt -vsync 0 -hwaccel cuvid -c:v h264_cuvidFFMPEG_OUTPUT_OPTIONS=-c:v h264_nvenc -c:a copy -movflags frag_keyframe+empty_moov+faststartI don't quite recall where I got the latter two options from, but this seems to also happeen with them set to their defaults.
- Open any stream.
Expected behavior The stream is hardware encoded with the GPU and shows up properly in the browser.
Debug Logs https://gist.github.com/LordMZTE/f43463c8569cba69c4f15cb4f994cfe2
Additional Notes
It seems like the invokation to avcodec_receive_packet here returns EAGAIN which is incorrectly being treated as an error condition while it actually signals that more data is needed.