Skip to content

Raise RTMP max_message so 4K keyframes are not dropped - #60

Open
mormegil6 wants to merge 1 commit into
EnvelopSound:masterfrom
mormegil6:max-message
Open

Raise RTMP max_message so 4K keyframes are not dropped#60
mormegil6 wants to merge 1 commit into
EnvelopSound:masterfrom
mormegil6:max-message

Conversation

@mormegil6

Copy link
Copy Markdown
Collaborator

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 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 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.

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.

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.
Copilot AI lite review requested due to automatic review settings August 6, 2026 08:27
@mormegil6

Copy link
Copy Markdown
Collaborator Author

Closing to review locally first; will reopen or resubmit if it holds up.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_message to 10M in the SSL-enabled transcoder config.
  • Increased RTMP max_message to 10M in 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.

@mormegil6

Copy link
Copy Markdown
Collaborator Author

Reopening after local review; content unchanged.

@mormegil6 mormegil6 reopened this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants