private void RunFFMPEG(FFmpegJob job)
        {
            Directory.CreateDirectory(Paths.TrackDataFolder(LocationMode.PlayerData));
            _log.Debug(("FFMPEG start: " + FFmpegQueue.binaryPath + " " + job.GetCommand()));
            bool   done    = false;
            string exepath = FFmpegQueue.binaryPath;
            string command = job.GetCommand();

            new Thread((ThreadStart)(() =>
            {
                string output = "";
                Process process = new Process();
                process.StartInfo.RedirectStandardOutput = true;
                process.StartInfo.RedirectStandardError = true;
                process.StartInfo.UseShellExecute = false;
                process.StartInfo.CreateNoWindow = true;
                process.StartInfo.FileName = exepath;
                process.StartInfo.Arguments = command;
                process.OutputDataReceived += (DataReceivedEventHandler)((s, e) => output += e.Data);
                process.ErrorDataReceived += (DataReceivedEventHandler)((s, e) => output += e.Data);
                process.Start();
                process.WaitForExit();
                process.Close();
                job._message = output;
                done = true;
            })).Start();
            while (!done)
            {
            }
            job._onFinished.Invoke(job);
            _log.Debug("FFMEG done");
        }
        private void OnConvertedToWav(FFmpegJob job)
        {
            _log.Debug("FFMPEG complete: " + job._outputPath);
            LocationMode locationMode = LocationMode.PlayerData;

            this.originalFileNameBackup = Path.GetFileNameWithoutExtension(job._inputPath);
            this.PopulateTrackDataFromAudioFile(job._outputPath, locationMode, job._inputPath, true);
        }
 public void Queue(FFmpegJob job) => RunFFMPEG(job);