Skip to content

Commit

Permalink
Set InvariantCulture for VOD times
Browse files Browse the repository at this point in the history
  • Loading branch information
lay295 committed Jan 16, 2021
1 parent 5c1229b commit 9708088
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions TwitchDownloaderCore/VideoDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,26 +207,21 @@ await Task.Run(() =>

await Task.Run(() =>
{
try
var process = new Process
{
var process = new Process
{
StartInfo =
StartInfo =
{
FileName = downloadOptions.FfmpegPath,
Arguments = String.Format("-y -avoid_negative_ts make_zero " + (downloadOptions.CropBeginning ? "-ss {1} " : "") + "-i \"{0}\" -analyzeduration {2} -probesize {2} " + (downloadOptions.CropEnding ? "-t {3} " : "") + "-c:v copy \"{4}\"", Path.Combine(downloadFolder, "output.ts"), (seekTime - startOffset).ToString(), Int32.MaxValue, seekDuration.ToString(), Path.GetFullPath(downloadOptions.Filename)),
Arguments = String.Format("-y -avoid_negative_ts make_zero " + (downloadOptions.CropBeginning ? "-ss {1} " : "") + "-i \"{0}\" -analyzeduration {2} -probesize {2} " + (downloadOptions.CropEnding ? "-t {3} " : "") + "-c:v copy \"{4}\"", Path.Combine(downloadFolder, "output.ts"), (seekTime - startOffset).ToString(CultureInfo.InvariantCulture), Int32.MaxValue, seekDuration.ToString(CultureInfo.InvariantCulture), Path.GetFullPath(downloadOptions.Filename)),
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardInput = false,
RedirectStandardOutput = false,
RedirectStandardError = false
}
};
process.Start();
process.WaitForExit();
}
catch (TaskCanceledException) { }
Cleanup(downloadFolder);
};
process.Start();
process.WaitForExit();
});
}
catch
Expand Down

0 comments on commit 9708088

Please sign in to comment.