Beispiel #1
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");
 }
 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");
 }
Beispiel #3
0
        public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
        {
            base.Apply(Settings, WriterArgs, OutputArgs);

            OutputArgs.AddArg("f", "mp4")
            .AddArg("-y");
        }
        public FFmpegDownloadModel(ProxySettings ProxySettings,
                                   ILocalizationProvider Loc,
                                   FFmpegSettings FFmpegSettings)
        {
            _proxySettings = ProxySettings;

            _ffmpegSettings = FFmpegSettings;
        }
Beispiel #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);
        }
Beispiel #6
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);
        }
Beispiel #7
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");
        }
Beispiel #8
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);
        }
Beispiel #9
0
 public FFmpegViewsProvider(ILocalizationProvider Loc,
                            IAudioPlayer AudioPlayer,
                            FFmpegSettings Settings,
                            IDialogService DialogService)
 {
     _loc           = Loc;
     _audioPlayer   = AudioPlayer;
     _settings      = Settings;
     _dialogService = DialogService;
 }
Beispiel #10
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}");
        }
Beispiel #11
0
        public FFmpegDownloadModel(ProxySettings ProxySettings,
                                   ILocalizationProvider Loc,
                                   FFmpegSettings FFmpegSettings)
        {
            _proxySettings = ProxySettings;

            this.FFmpegSettings = FFmpegSettings;

            EnsureDir();
        }
        public FFmpegCodecsViewModel(FFmpegSettings settings)
        {
            Settings = settings;

            AddCustomCodecCommand = new DelegateCommand(() => settings.CustomCodecs.Add(new CustomFFmpegCodec()));

            RemoveCustomCodecCommand = new DelegateCommand(o =>
            {
                if (o is CustomFFmpegCodec codec)
                {
                    settings.CustomCodecs.Remove(codec);
                }
            });
        }
        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);
        }
Beispiel #14
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);
        }
Beispiel #15
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);
        }
 protected abstract string GetLink(FFmpegSettings Settings);
Beispiel #17
0
 public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
 {
     OutputArgs.AddArg(_customCodec.Args);
 }
 public abstract void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs);
Beispiel #19
0
 public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
 {
     OutputArgs.AddArg("c:v", _fFmpegCodecName)
     .AddArg("pixel_format", "yuv444p")
     .AddArg("preset", "fast");
 }
Beispiel #20
0
 public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
 {
     OutputArgs.AddArg($"-c:v {_fFmpegCodecName}")
     .AddArg("-pixel_format yuv444p")
     .AddArg(" -preset fast");
 }
        static FFmpegSettings GetSettings()
        {
            _getSettings = _getSettings ?? new FFmpegSettings();

            return(_getSettings);
        }
Beispiel #22
0
 protected override string GetLink(FFmpegSettings Settings)
 {
     return($"rtmp://a.rtmp.youtube.com/live2/{Settings.YouTubeLiveKey}");
 }
 protected override string GetLink(FFmpegSettings Settings)
 {
     return($"{Settings.MixerLiveUrl}/{Settings.MixerLiveKey}");
 }
Beispiel #24
0
 protected override string GetLink(FFmpegSettings Settings)
 {
     return(Settings.WowzaLiveUrl);
 }
Beispiel #25
0
 public FFmpegWriterProvider(FFmpegSettings Settings)
 {
     _settings = Settings;
 }