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

fix(server): h264 and hevc not respecting max bitrate #3052

Merged
merged 2 commits into from
Jul 1, 2023

Conversation

mertalev
Copy link
Contributor

@mertalev mertalev commented Jun 30, 2023

Description

H.264 and HEVC ignore -maxrate unless -bufsize is also specified. This PR adds -bufsize to the command when constraining bitrate with these codecs. The common suggestion is to set -bufsize to twice the max bitrate to allow budgeting more bandwidth for difficult frames. The max bitrate is then the max rolling average over any 2 second period.

Fixes #3050

Testing

  1. Set the target codec to h264 and set the max bitrate to a positive number.
  2. Transcode a video.
  3. Inspect the bitrate of this transcode. It should be very similar to the max bitrate or below it.

@vercel
Copy link

vercel bot commented Jun 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
immich ⬜️ Ignored (Inspect) Jun 30, 2023 9:18pm

@alextran1502 alextran1502 merged commit b1fcf02 into main Jul 1, 2023
19 checks passed
@alextran1502 alextran1502 deleted the fix-max-bitrate-h264-hevc branch July 1, 2023 01:48
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.

[BUG] Max bitrate is not enforced
3 participants