private void StartChunking(StreamSource streamCfg)
        {
            var proc   = new Process();
            var nextID = GetLastProducedIndex(streamCfg);

            var procInfo = new ProcessStartInfo()
            {
                FileName        = _ffmpegCfg.BinaryPath,
                UseShellExecute = false,
                Arguments       = GenerateProcArguments(streamCfg, proc.Id, nextID)
            };

            procInfo.RedirectStandardOutput = !LogToStdout;
            procInfo.RedirectStandardError  = !LogToStdout;

            proc.StartInfo           = procInfo;
            proc.EnableRaisingEvents = true;
            proc.Exited += OnProcExit;
            var procEntry = processes.FirstOrDefault(
                x => x.Name == streamCfg.Name);

            if (procEntry == null)
            {
                processes.Add(new ProcEntry
                {
                    Name = streamCfg.Name,
                    Hash = streamCfg.GetHashCode(),
                    Proc = proc
                });
            }
            else
            {
                procEntry.Proc = proc;
            }

            proc.Start();
            proc.WaitForExit();
        }
        private void StartChunking(StreamSource streamSource)
        {
            var procStartInfo = new ProcessStartInfo()
            {
                FileName        = _chunkerConfig.BinaryPath,
                UseShellExecute = false,
                Arguments       = GetProcArguments(streamSource, procUniqueKey++)
            };

            var proc = new Process();

            proc.StartInfo           = procStartInfo;
            proc.EnableRaisingEvents = true;
            proc.Exited += OnProcExit;

            if (proc.Start())
            {
                var procEntry = processes.FirstOrDefault(
                    x => x.Name == streamSource.Name);

                if (procEntry == null)
                {
                    processes.Add(new ProcEntry
                    {
                        Name = streamSource.Name,
                        Hash = streamSource.GetHashCode(),
                        Proc = proc
                    });
                }
                else
                {
                    procEntry.Proc = proc;
                }

                proc.WaitForExit();
            }
        }