* upgrade sdk * fix warnings in ersatztv.ffmpeg * fix warnings in ersatztv.core * fix warnings in ersatztv.infrastructure * fix warnings in ersatztv.application * disable analysis for migrations projects * fix warnings in ersatztv.scanner * fix warnings in ersatztv * upgrade project framework * update github actions and dockerfiles
20 lines
477 B
C#
20 lines
477 B
C#
namespace ErsatzTV.FFmpeg.OutputOption;
|
|
|
|
public class VideoBitrateOutputOption : OutputOption
|
|
{
|
|
private readonly int _bitrate;
|
|
|
|
public VideoBitrateOutputOption(int bitrate) => _bitrate = bitrate;
|
|
|
|
public override string[] OutputOptions => new[]
|
|
{
|
|
"-b:v", $"{_bitrate}k",
|
|
"-maxrate:v", $"{_bitrate}k"
|
|
};
|
|
|
|
public override FrameState NextState(FrameState currentState) => currentState with
|
|
{
|
|
VideoBitrate = _bitrate
|
|
};
|
|
}
|