mirror of https://github.com/ErsatzTV/ErsatzTV.git
6 changed files with 3 additions and 90 deletions
@ -1,34 +0,0 @@
@@ -1,34 +0,0 @@
|
||||
using ErsatzTV.FFmpeg.Format; |
||||
|
||||
namespace ErsatzTV.FFmpeg.OutputOption; |
||||
|
||||
public class AmdCropMetadataWorkaroundFilter(string videoFormat, FrameSize frameSize) : OutputOption |
||||
{ |
||||
public override string[] OutputOptions |
||||
{ |
||||
get |
||||
{ |
||||
if (videoFormat is not VideoFormat.Hevc) |
||||
{ |
||||
return []; |
||||
} |
||||
|
||||
int cropPixels = frameSize.Height switch |
||||
{ |
||||
1080 => 8, |
||||
_ => 0 |
||||
}; |
||||
|
||||
if (cropPixels == 0) |
||||
{ |
||||
return []; |
||||
} |
||||
|
||||
return |
||||
[ |
||||
"-bsf:v", |
||||
$"{videoFormat}_metadata=crop_bottom={cropPixels}" |
||||
]; |
||||
} |
||||
} |
||||
} |
||||
@ -1,35 +0,0 @@
@@ -1,35 +0,0 @@
|
||||
using ErsatzTV.FFmpeg.Format; |
||||
|
||||
namespace ErsatzTV.FFmpeg.OutputOption; |
||||
|
||||
public class NvidiaGreenLineWorkaroundFilter(string videoFormat, FrameSize frameSize) : OutputOption |
||||
{ |
||||
public override string[] OutputOptions |
||||
{ |
||||
get |
||||
{ |
||||
if (videoFormat is not VideoFormat.H264) |
||||
{ |
||||
return []; |
||||
} |
||||
|
||||
int cropPixels = frameSize.Height switch |
||||
{ |
||||
1080 => 8, |
||||
720 => 16, |
||||
_ => 0 |
||||
}; |
||||
|
||||
if (cropPixels == 0) |
||||
{ |
||||
return []; |
||||
} |
||||
|
||||
return |
||||
[ |
||||
"-bsf:v", |
||||
$"{videoFormat}_metadata=crop_bottom={cropPixels}" |
||||
]; |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue