BiliRanking.WPF.View.VideoClip.buttonRender_Click C# (CSharp) 메소드

buttonRender_Click() 개인적인 메소드

private buttonRender_Click ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
리턴 void
        private void buttonRender_Click(object sender, RoutedEventArgs e)
        {
            string fullName = Player.VlcMediaPlayer.Media.Mrl.Substring(8);
            string directoryName = System.IO.Path.GetDirectoryName(fullName);
            string fileName = System.IO.Path.GetFileName(fullName);
            string fileNameWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(fullName);
            string extension = System.IO.Path.GetExtension(fullName);

            string command = $"-i \"{fullName}\" -ss {markStart.ToString()} -to {markEnd.ToString()} -vcodec libx264 -acodec copy -crf 18 \"{System.IO.Path.Combine(directoryName, "CLIP_" + fileName)}\"";
            dialogProcessing.IsOpen = true;
            Process p = new Process();
            p.StartInfo.FileName = Environment.CurrentDirectory + "\\ffmpeg.exe";
            p.StartInfo.Arguments = command;
            p.StartInfo.UseShellExecute = false;
            p.StartInfo.RedirectStandardError = true;
            p.StartInfo.CreateNoWindow = true;
            p.ErrorDataReceived += new DataReceivedEventHandler(Output);
            p.Start();
            p.BeginErrorReadLine();
            p.EnableRaisingEvents = true;
            p.Exited += new EventHandler(CmdProcess_Exited);
            //Clipboard.SetText(command);
        }