Raise RTMP max_message so 4K keyframes are not dropped - #60
Open
mormegil6 wants to merge 1 commit into
Open
Conversation
nginx-rtmp's default max_message is 1 MB, sized for typical broadcast bitrates and GOPs, not 4K H.264 keyframes, which can exceed it. When that happens the relay drops the publish outright with "too big message" before the exec'd ffmpeg ever receives a frame, which looks like an ffmpeg/config problem but is actually the relay refusing the input. Raised to 10 MB, comfortably above a realistic 4K keyframe at typical streaming bitrates, on the same listen block in both transcoder configs. Verified against a 4K H.264 publish that reliably hit "too big message" at the 1 MB default and transcodes cleanly at 10 MB.
Collaborator
Author
|
Closing to review locally first; will reopen or resubmit if it holds up. |
There was a problem hiding this comment.
Pull request overview
Raises nginx-rtmp’s max_message limit in the transcoder RTMP server configs to prevent large 4K H.264 keyframes from being rejected with “too big message” before the ffmpeg exec pipeline receives any data.
Changes:
- Increased RTMP
max_messageto10Min the SSL-enabled transcoder config. - Increased RTMP
max_messageto10Min the no-SSL transcoder config. - Added inline comments documenting the rationale and failure mode being addressed.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| nginx-transcoder/nginx.conf | Raises RTMP max_message to 10M (with rationale) for the SSL-enabled transcoder config. |
| nginx-transcoder/nginx-no-ssl.conf | Raises RTMP max_message to 10M (with rationale) for the no-SSL transcoder config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
Author
|
Reopening after local review; content unchanged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nginx-rtmp's default
max_messageis 1 MB, sized for typical broadcast bitrates and GOPs, not 4K H.264 keyframes, which can exceed it. When that happens the relay drops the publish outright with "too big message" before the exec'd ffmpeg ever receives a frame, which looks like an ffmpeg or config problem but is actually the relay refusing the input.Raised to 10 MB, comfortably above a realistic 4K keyframe at typical streaming bitrates, on the same
listenblock in both transcoder configs.Verified against a 4K H.264 publish that reliably hit "too big message" at the 1 MB default and transcodes cleanly at 10 MB.
One of three small, independent patches from the same audit, kept separate (along with #dash-spd-floor, #dash-name) so each can be reviewed on its own merits.