public TranscodeVideo ConvertToVideo(String inputPath, String outputFolder, VideoFomatsSupported videoFormat) { validArguments(inputPath, outputFolder); _transcodevideo = new TranscodeVideo(); _transcodevideo.Convert(inputPath, outputFolder, videoFormat); return _transcodevideo; }
internal void Convert(String inputPath, String outputPath, VideoFomatsSupported videoFormat, ConversionOptions conversionOptions = null) { if (!Enum.GetNames(typeof(VideoFomatsSupported)).Cast<String>() .Any(vfs => vfs.Equals(System.IO.Path.GetExtension(inputPath.ToLower()).Substring(1)))) throw new Exception("Format du fichier n'est pas supporté"); _inputFilePath = inputPath; _outputFilePath = outputPath; _videoFormatsSupported = videoFormat; conversionOptions = conversionOptions ?? new ConversionOptions(); }