mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #5019] [CLOSED] Change the transcode bitrate scaler GetVideoBitrateParamValue #10369
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/5019
Author: @hawken93
Created: 1/13/2021
Status: ❌ Closed
Base:
master← Head:bitrates📝 Commits (1)
f7d2891Change the transcode bitrate scaler GetVideoBitrateParamValue to be more logical📊 Changes
1 file changed (+13 additions, -25 deletions)
View changed files
📝
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs(+13 -25)📄 Description
I was annoyed that I got a much worse looking transcode than my source file.
I think the misconception from Emby all along has been that there's an equivalency between the source bitrate and the transcode bitrate, that the transcoded bitrate should be less or equal to the original one.
However, the original encoding has often been done with very nicely tweaked settings and a really slow encoding preset. The transcode will probably not look anywhere near as good as the original for the same bitrate.
That's why I want to extend the code a bit to add 1.5x headroom to all video streams, alongside the tweaks that add 2-4x bitrate to low bitrate video files.
While I was looking at it, I spotted logic errors that could cause between 4-10x bitrate for 500k - 3Mbit files, so I've changed the code a bit to make it more humanly understandable.
Arguably for h264, but I don't know for the other codecs, there's already a crf setting applied that will cause a sane bitrate limit for the transcoder. This means that if we just took the client setting (60Mbit or whatever) then the crf will become the deciding factor, so maybe we don't need to limit the bitrate based on the input. Table is open for discussions I guess.
There has been a long time since last I messed with this, so I think it should be tested for regressions no matter how safe the code changes look to my eyes..
Changes
Issues
I bet there are some issues complaining about blocking artifacts and whatnot caused by bitrate starvation.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.