Exemplo n.º 1
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            //Create a VideoEncoder and launch it with proper arguments
            //Remember to change the ffmpeg, input and output path!
            SharpFFmpegEnc.VideoEncoder encoder = new SharpFFmpegEnc.VideoEncoder("ffmpeg.exe");

            //Assign a method to each event
            encoder.EventLineRead += encoder_EventLineRead;
            encoder.EventEncodingProgressChanged += encoder_EventEncodingProgressChanged;
            encoder.EventEncodingCompleted       += encoder_EventEncodingCompleted;

            encoder.Encode("-y -i INPUT_PATH -c:v libx264 -crf 30 OUTPUT PATH");
        }
Exemplo n.º 2
0
        public void Merge(List <string> fileList, string outputFile, string extention, ref AdvancedSettings advancedSettings)
        {
            WriteFileList(fileList);
            string arguments = "";

            if (advancedSettings.AudioEncodingEnabled == true)
            {
                arguments = String.Format("-f concat -i \"{0}\" -c:v copy -c:a {1} -b:a {2} \"{3}\"", listPath, advancedSettings.AudioEncoder, advancedSettings.AudioBitrate, outputFile + extention);
            }
            else
            {
                arguments = String.Format("-f concat -i \"{0}\" -c copy \"{1}\"", listPath, outputFile + extention);
            }

            encoder.Encode(arguments);
        }