Files
ersatztv/ErsatzTV.FFmpeg/Encoder/Rkmpp/EncoderH264Rkmpp.cs
T
d855e4f20d Add initial support for Rockchip Media Process Platform (rkmpp) hardware acceleration (#2418)
* Add Rockchip Media Process Platform (rkmpp) acceleration

* remove fourcc stuff; it's exclusive to videotoolbox

* update changelog

---------

Co-authored-by: Jason Dove <1695733+jasongdove@users.noreply.github.com>
2025-09-16 00:51:56 +00:00

32 lines
835 B
C#

using ErsatzTV.FFmpeg.Format;
namespace ErsatzTV.FFmpeg.Encoder.Rkmpp;
public class EncoderH264Rkmpp(Option<string> maybeVideoProfile) : EncoderBase
{
public override string Name => "h264_rkmpp";
public override StreamKind Kind => StreamKind.Video;
public override string[] OutputOptions
{
get
{
foreach (string videoProfile in maybeVideoProfile)
{
return
[
"-c:v", Name,
"-profile:v", videoProfile.ToLowerInvariant()
];
}
return base.OutputOptions;
}
}
public override FrameState NextState(FrameState currentState) => currentState with
{
VideoFormat = VideoFormat.H264,
FrameDataLocation = FrameDataLocation.Hardware
};
}