Пример #1
0
 public override void Apply(VideoWriterArgs writerArgs, FFmpegOutputOptionArgs outputOptionArgs)
 {
     outputOptionArgs.SetVideoCodec(Codecs.FFmpegVideoCodec.hevc_qsv)
         .AddArg("load_plugin", "hevc_hw")
         .AddArg("q", 2)
         .AddArg("preset:v", "veryfast");
 }
Пример #2
0
        public override void Apply(VideoWriterArgs writerArgs, FFmpegOutputOptionArgs outputOptionArgs)
        {
            // quality: 31 (lowest) to 1 (highest)
            var qscale = 31 - ((writerArgs.VideoQuality - 1) * 30) / 99;

            outputOptionArgs.SetVideoCodec(Codecs.FFmpegVideoCodec.libxvid)
            .AddArg("qscale:v", qscale);
        }
Пример #3
0
        public override void Apply(VideoWriterArgs videoWriterArgs, FFmpegOutputOptionArgs outputOptionArgs)
        {
            // quality: 63 (lowest) to 4 (highest)
            var crf = 63 - ((videoWriterArgs.VideoQuality - 1) * 59) / 99;

            outputOptionArgs.SetVideoCodec(Codecs.FFmpegVideoCodec.libvpx)
            .AddArg("crf", crf)
            .SetVideoBitrate("1M");
        }
Пример #4
0
        public override void Apply(VideoWriterArgs videoWriterArgs, FFmpegOutputOptionArgs outputOptionArgs)
        {
            // quality: 63 (lowest) to 0 (highest)
            var crf = (63 * (100 - videoWriterArgs.VideoQuality)) / 99;

            outputOptionArgs.SetVideoCodec(Codecs.FFmpegVideoCodec.libvpx_vp9)
            .AddArg("crf", crf)
            .SetVideoBitrate(0);
        }
Пример #5
0
        public override void Apply(VideoWriterArgs writerArgs, FFmpegOutputOptionArgs outputOptionArgs)
        {
            // quality: 51 (lowest) to 0 (highest)
            var crf = (51 * (100 - writerArgs.VideoQuality)) / 99;

            outputOptionArgs.SetVideoCodec(Codecs.FFmpegVideoCodec.libx264)
            .AddArg("crf", crf)
            //"yuv420p", "yuv444p"
            .SetPixFormat(Formats.FFmpegPixFormat.yuv420p)
            //"veryslow", "slower", "slow", "medium", "fast", "faster", "veryfast", "superfast", "ultrafast"
            .AddArg("preset", "ultrafast");
        }