public FFmpegOutputArgs AddStdOut()
        {
            var output = new FFmpegOutputArgs("-");

            _outputs.Add(output);

            return(output);
        }
        public FFmpegOutputArgs AddOutputPipe(string NamedPipe)
        {
            var output = new FFmpegOutputArgs($"{PipePrefix}{NamedPipe}");

            _outputs.Add(output);

            return(output);
        }
        public FFmpegOutputArgs AddOutputFile(string FileName)
        {
            var output = new FFmpegOutputArgs($"\"{FileName}\"");

            _outputs.Add(output);

            return(output);
        }
Exemple #4
0
        public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
        {
            // quality: 51 (lowest) to 0 (highest)
            var crf = (51 * (100 - WriterArgs.VideoQuality)) / 99;

            OutputArgs.AddArg("-vcodec libx264")
            .AddArg($"-crf {crf}")
            .AddArg($"-pix_fmt {Settings.X264.PixelFormat}")
            .AddArg($"-preset {Settings.X264.Preset}");
        }
Exemple #5
0
        public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
        {
            // quality: 31 (lowest) to 1 (highest)
            var qscale = 31 - ((WriterArgs.VideoQuality - 1) * 30) / 99;

            OutputArgs.AddArg("vcodec", "libxvid")
            .AddArg("qscale:v", qscale);
        }
 public abstract void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs);
Exemple #7
0
 public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
 {
     OutputArgs.AddArg("c:v", _fFmpegCodecName)
     .AddArg("pixel_format", "yuv444p")
     .AddArg("preset", "fast");
 }
Exemple #8
0
        public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
        {
            // quality: 63 (lowest) to 4 (highest)
            var crf = 63 - ((WriterArgs.VideoQuality - 1) * 59) / 99;

            OutputArgs.AddArg("vcodec", "libvpx")
            .AddArg("crf", crf)
            .AddArg("b:v", "1M");
        }
 public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
 {
     OutputArgs.AddArg("-vcodec hevc_qsv")
     .AddArg("-load_plugin hevc_hw")
     .AddArg("-q 2")
     .AddArg("-preset:v veryfast");
 }
Exemple #10
0
        public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
        {
            base.Apply(Settings, WriterArgs, OutputArgs);

            OutputArgs.AddArg("f", "mp4")
            .AddArg("-y");
        }
Exemple #11
0
        public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
        {
            // quality: 63 (lowest) to 0 (highest)
            var crf = (63 * (100 - WriterArgs.VideoQuality)) / 99;

            OutputArgs.AddArg("vcodec", "libvpx-vp9")
            .AddArg("crf", crf)
            .AddArg("b:v", 0);
        }
Exemple #12
0
        public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
        {
            // quality: 51 (lowest) to 0 (highest)
            var crf = (51 * (100 - WriterArgs.VideoQuality)) / 99;

            OutputArgs.AddArg("vcodec", "libx264")
            .AddArg("crf", crf)
            .AddArg("pix_fmt", Settings.X264.PixelFormat)
            .AddArg("preset", Settings.X264.Preset);
        }
Exemple #13
0
        public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
        {
            // quality: 51 (lowest) to 0 (highest)
            var crf = (51 * (100 - WriterArgs.VideoQuality)) / 99;

            OutputArgs.AddArg("maxrate", "5000k")
            .AddArg("bitrate", "5000k")
            .AddArg("bufsize", "10M")
            .AddArg("pix_fmt", Settings.X264.PixelFormat)
            //.AddArg("preset", Settings.X264.Preset)
            .AddArg("g", WriterArgs.FrameRate * 2)
            //.AddArg("r", WriterArgs.FrameRate)
            .AddArg("f", "flv");

            var link = GetLink(Settings);

            WriterArgs.FileName = link;
            OutputArgs.UpdateOutput(link);
        }
Exemple #14
0
 public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
 {
     OutputArgs.AddArg($"-c:v {_fFmpegCodecName}")
     .AddArg("-pixel_format yuv444p")
     .AddArg(" -preset fast");
 }
Exemple #15
0
 public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
 {
     OutputArgs.AddArg("vcodec", "hevc_qsv")
     .AddArg("load_plugin", "hevc_hw")
     .AddArg("q", 2)
     .AddArg("preset:v", "veryfast");
 }
Exemple #16
0
 public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
 {
     OutputArgs.AddArg(_customCodec.Args);
 }
        public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
        {
            var x264 = new X264VideoCodec();

            x264.Apply(Settings, WriterArgs, OutputArgs);

            OutputArgs.AddArg($"-g {WriterArgs.FrameRate * 2}")
            .AddArg($"-r {WriterArgs.FrameRate}")
            .AddArg("-f flv");

            var link = GetLink(Settings);

            WriterArgs.FileName = link;
            OutputArgs.UpdateOutput(link);
        }
Exemple #18
0
        public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
        {
            var x264 = new X264VideoCodec();

            x264.Apply(Settings, WriterArgs, OutputArgs);

            OutputArgs.AddArg("g", WriterArgs.FrameRate * 2)
            .AddArg("maxrate", "4500k")
            .AddArg("b:v", "4500k")
            .AddArg("bufsize", "5M")
            //.AddArg("r", WriterArgs.FrameRate)
            .AddArg("f", "flv");

            var link = GetLink(Settings);

            WriterArgs.FileName = link;
            OutputArgs.UpdateOutput(link);
        }