@ -94,12 +94,13 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@@ -94,12 +94,13 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
}
// 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 ,
"libx264" or "h264_nvenc" or "h264_qsv" or "h264_vaapi" or "h264_videotoolbox" = > VideoFormat . H264 ,
"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
@ -142,8 +143,8 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@@ -142,8 +143,8 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
playbackSettings . VideoBufferSize ,
playbackSettings . VideoTrackTimeScale ,
playbackSettings . Deinterlace ,
channel . FFmpegProfile . AudioCodec ,
channel . FFmpegProfile . AudioChannels ,
playbackSettings . AudioCodec ,
playbackSettings . AudioChannels ,
playbackSettings . AudioBitrate ,
playbackSettings . AudioBufferSize ,
playbackSettings . AudioSampleRate ,