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

Wrong ffmpeg parameters for bitrate limiting #970

Open
joef42 opened this issue Feb 3, 2025 · 1 comment
Open

Wrong ffmpeg parameters for bitrate limiting #970

joef42 opened this issue Feb 3, 2025 · 1 comment

Comments

@joef42
Copy link

joef42 commented Feb 3, 2025

I think the parameters used for ffmpeg are not doing what they are expected to do. When using crf with h264 an additional -b:v parameter is ignored. According to https://trac.ffmpeg.org/wiki/Encode/H.264#ConstrainedencodingVBVmaximumbitrate for targeting a crf while still limiting the maximum bitrate -maxrate and -bufsize should be used.

Other than that this is a great webapp, exactly what I was looking for 👍 .

@joef42
Copy link
Author

joef42 commented Feb 16, 2025

Sorry, another question/comment on ffmpeg parameters. I noticed that all thumbnails for videos have a rather bad quality, even for HD videos. I found that webp thumbnails for videos are generated with -qscale:v 4 setting. Did some manual tests and while for jpg outputs 4 seemed ok-ish, for webp the quality is not that great and the file size was much smaller on average than the generated webp thumbnails for images. I got much better results with -qscale:v 50 with a size more in the range of thumbnails for images.

Could this be changed? I can also create a PR if it helps.

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

No branches or pull requests

1 participant