|
|
|
@ -94,12 +94,13 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// TODO: need formats for these codecs
|
|
|
|
// TODO: need formats for these codecs
|
|
|
|
string videoFormat = channel.FFmpegProfile.VideoCodec switch |
|
|
|
string videoFormat = playbackSettings.VideoCodec switch |
|
|
|
{ |
|
|
|
{ |
|
|
|
"libx265" or "hevc_nvenc" or "hevc_qsv" or "hevc_vaapi" or "hevc_videotoolbox" => VideoFormat.Hevc, |
|
|
|
"libx265" or "hevc_nvenc" or "hevc_qsv" or "hevc_vaapi" or "hevc_videotoolbox" => VideoFormat.Hevc, |
|
|
|
"libx264" or "h264_nvenc" or "h264_qsv" or "h264_vaapi" or "h264_videotoolbox" => VideoFormat.H264, |
|
|
|
"libx264" or "h264_nvenc" or "h264_qsv" or "h264_vaapi" or "h264_videotoolbox" => VideoFormat.H264, |
|
|
|
"mpeg2video" => VideoFormat.Mpeg2Video, |
|
|
|
"mpeg2video" => VideoFormat.Mpeg2Video, |
|
|
|
_ => throw new ArgumentOutOfRangeException($"unexpected video codec {channel.FFmpegProfile.VideoCodec}") |
|
|
|
"copy" => VideoFormat.Copy, |
|
|
|
|
|
|
|
_ => throw new ArgumentOutOfRangeException($"unexpected video codec {playbackSettings.VideoCodec}") |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
HardwareAccelerationMode hwAccel = playbackSettings.HardwareAcceleration switch |
|
|
|
HardwareAccelerationMode hwAccel = playbackSettings.HardwareAcceleration switch |
|
|
|
@ -142,8 +143,8 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService |
|
|
|
playbackSettings.VideoBufferSize, |
|
|
|
playbackSettings.VideoBufferSize, |
|
|
|
playbackSettings.VideoTrackTimeScale, |
|
|
|
playbackSettings.VideoTrackTimeScale, |
|
|
|
playbackSettings.Deinterlace, |
|
|
|
playbackSettings.Deinterlace, |
|
|
|
channel.FFmpegProfile.AudioCodec, |
|
|
|
playbackSettings.AudioCodec, |
|
|
|
channel.FFmpegProfile.AudioChannels, |
|
|
|
playbackSettings.AudioChannels, |
|
|
|
playbackSettings.AudioBitrate, |
|
|
|
playbackSettings.AudioBitrate, |
|
|
|
playbackSettings.AudioBufferSize, |
|
|
|
playbackSettings.AudioBufferSize, |
|
|
|
playbackSettings.AudioSampleRate, |
|
|
|
playbackSettings.AudioSampleRate, |
|
|
|
|