mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-31 04:05:50 -04:00
Fix H264 QSV encoding when the bitrate is too low
h264_qsv expects a bitrate equal or higher than 1000k, or it fails. Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
parent
b2dcc7c90e
commit
31d2f653fa
@ -1216,6 +1216,12 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
|
|
||||||
int bitrate = state.OutputVideoBitrate.Value;
|
int bitrate = state.OutputVideoBitrate.Value;
|
||||||
|
|
||||||
|
// Bit rate under 1000k is not allowed in h264_qsv
|
||||||
|
if (string.Equals(videoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
bitrate = Math.Max(bitrate, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
// Currently use the same buffer size for all encoders
|
// Currently use the same buffer size for all encoders
|
||||||
int bufsize = bitrate * 2;
|
int bufsize = bitrate * 2;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user