Esempio n. 1
0
        public async Task ExecuteAsync(FFmpegParameters parameters, string ffmpegFilePath, CancellationToken?cancellationToken = null)
        {
            var argumentBuilder = new FFmpegArgumentBuilder();
            var arguments       = argumentBuilder.Build(parameters);
            var startInfo       = GenerateStartInfo(ffmpegFilePath, arguments);

            await ExecuteAsync(startInfo, parameters, cancellationToken);
        }
Esempio n. 2
0
        public async Task ExecuteAsync(CancellationToken cancellationToken)
        {
            _messages        = new List <string>();
            _caughtException = null;
            string           arguments = FFmpegArgumentBuilder.Build(_parameters);
            ProcessStartInfo startInfo = GenerateStartInfo(_ffmpegFilePath, arguments);

            await ExecuteAsync(startInfo, _parameters, cancellationToken).ConfigureAwait(false);
        }
Esempio n. 3
0
        public async Task ExecuteAsync()
        {
            messages        = new List <string>();
            caughtException = null;
            string           arguments = FFmpegArgumentBuilder.Build(parameters);
            ProcessStartInfo startInfo = GenerateStartInfo(ffmpegFilePath, arguments);

            await ExecuteAsync(startInfo, parameters, cancellationToken);
        }
Esempio n. 4
0
        public async Task ExecuteAsync(FFmpegParameters parameters, string ffmpegFilePath, CancellationToken cancellationToken = default)
        {
            var argumentBuilder = new FFmpegArgumentBuilder();
            var arguments       = argumentBuilder.Build(parameters);
            var startInfo       = GenerateStartInfo(ffmpegFilePath, arguments);

            Debug.WriteLine($"ffmpeg arguments: {arguments}");
            await ExecuteAsync(startInfo, parameters, cancellationToken);
        }
Esempio n. 5
0
        public string GetConversionString(MediaFile input, MediaFile output, ConversionOptions options)
        {
            var parameters = new FFmpegParameters
            {
                Task              = FFmpegTask.Convert,
                InputFile         = input,
                OutputFile        = output,
                ConversionOptions = options
            };
            var argumentBuilder = new FFmpegArgumentBuilder();
            var arguments       = argumentBuilder.Build(parameters);

            return(arguments);
        }