limit framerate normalization to 24fps and above (#662)
This commit is contained in:
@@ -9,6 +9,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- Fix watermark on scaled and/or padded video with NVIDIA acceleration
|
- Fix watermark on scaled and/or padded video with NVIDIA acceleration
|
||||||
- Fix playback of interlaced mpeg2video content with NVIDIA acceleration
|
- Fix playback of interlaced mpeg2video content with NVIDIA acceleration
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Framerate normalization will never normalize framerate below 24fps
|
||||||
|
- Instead, content with a lower framerate will be normalized up to 24fps
|
||||||
|
|
||||||
## [0.4.2-alpha] - 2022-02-26
|
## [0.4.2-alpha] - 2022-02-26
|
||||||
### Fixed
|
### Fixed
|
||||||
- Add improved but experimental transcoder logic, which can be toggled on and off in `Settings`
|
- Add improved but experimental transcoder logic, which can be toggled on and off in `Settings`
|
||||||
|
|||||||
@@ -58,12 +58,23 @@ public class GetChannelFramerateHandler : IRequestHandler<GetChannelFramerate, O
|
|||||||
.Map(mv => mv.RFrameRate)
|
.Map(mv => mv.RFrameRate)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
|
||||||
var distinct = frameRates.Distinct().ToList();
|
var distinct = frameRates.Distinct().ToList();
|
||||||
if (distinct.Count > 1)
|
if (distinct.Count > 1)
|
||||||
{
|
{
|
||||||
// TODO: something more intelligent than minimum framerate?
|
// TODO: something more intelligent than minimum framerate?
|
||||||
int result = frameRates.Map(ParseFrameRate).Min();
|
int result = frameRates.Map(ParseFrameRate).Min();
|
||||||
|
if (result < 24)
|
||||||
|
{
|
||||||
|
_logger.LogInformation(
|
||||||
|
"Normalizing frame rate for channel {ChannelNumber} from {Distinct} to {FrameRate} instead of min value {MinFrameRate}",
|
||||||
|
request.ChannelNumber,
|
||||||
|
distinct,
|
||||||
|
24,
|
||||||
|
result);
|
||||||
|
|
||||||
|
return 24;
|
||||||
|
}
|
||||||
|
|
||||||
_logger.LogInformation(
|
_logger.LogInformation(
|
||||||
"Normalizing frame rate for channel {ChannelNumber} from {Distinct} to {FrameRate}",
|
"Normalizing frame rate for channel {ChannelNumber} from {Distinct} to {FrameRate}",
|
||||||
request.ChannelNumber,
|
request.ChannelNumber,
|
||||||
|
|||||||
Reference in New Issue
Block a user