Skip to content
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

h264, h265: raise MaxNALUSize #30

Merged
merged 1 commit into from
Aug 3, 2023
Merged

Conversation

database64128
Copy link
Contributor

When streaming a 50Mbps 2160p60 HEVC video encoded by AMD AMF from OBS via RTMP, none of the frames can get through:

unable to decode AVCC: NALU size (3497231) is too big, maximum is 3145728

Reducing the resolution to 1440p allows most of the frames to get through, but the same error still appears about once every 15 minutes:

unable to decode AVCC: NALU size (3464043) is too big, maximum is 3145728
unable to decode AVCC: NALU size (3463992) is too big, maximum is 3145728
unable to decode AVCC: NALU size (3463991) is too big, maximum is 3145728
unable to decode AVCC: NALU size (3417504) is too big, maximum is 3145728
unable to decode AVCC: NALU size (3417342) is too big, maximum is 3145728
unable to decode AVCC: NALU size (3372157) is too big, maximum is 3145728
unable to decode AVCC: NALU size (3314591) is too big, maximum is 3145728

Raising the size limit to 4 MiB seems to have resolved the issue for me. Updated the comment as well.

When streaming a 50Mbps 2160p60 HEVC video encoded by AMD AMF from OBS via RTMP, none of the frames can get through:

unable to decode AVCC: NALU size (3497231) is too big, maximum is 3145728

Reducing the resolution to 1440p allows most of the frames to get through, but the same error still appears about once every 15 minutes:

unable to decode AVCC: NALU size (3464043) is too big, maximum is 3145728

Raising the size limit to 4 MiB seems to have resolved the issue for me. Updated the comment as well.
@aler9
Copy link
Member

aler9 commented Aug 3, 2023

Thanks for your tests, adding limits is required in order to prevent RAM exhaustion-based attacks but nothing prevents to update them. Merged.

@aler9 aler9 merged commit d608b64 into bluenviron:main Aug 3, 2023
@database64128 database64128 deleted the nalu-size branch August 5, 2023 11:14
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants