Skip to content

Commit

Permalink
Remove query string when writing concat list (#1107)
Browse files Browse the repository at this point in the history
* Remove query string when writing concat list

* Auto flush ffmpeg log
  • Loading branch information
ScrubN authored Jun 23, 2024
1 parent 0a31cce commit ed5afde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion TwitchDownloaderCore/Tools/FfmpegConcatList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static async Task SerializeAsync(string filePath, M3U8 playlist, Range vi
cancellationToken.ThrowIfCancellationRequested();

await sw.WriteAsync("file '");
await sw.WriteAsync(stream.Path);
await sw.WriteAsync(DownloadTools.RemoveQueryString(stream.Path));
await sw.WriteLineAsync('\'');

await sw.WriteAsync("duration ");
Expand Down
1 change: 1 addition & 0 deletions TwitchDownloaderCore/VideoDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ private int RunFfmpegVideoCopy(string tempFolder, FileInfo outputFile, string co
process.BeginErrorReadLine();

using var logWriter = File.AppendText(Path.Combine(tempFolder, "ffmpegLog.txt"));
logWriter.AutoFlush = true;
do // We cannot handle logging inside the ErrorDataReceived lambda because more than 1 can come in at once and cause a race condition. lay295#598
{
Thread.Sleep(100);
Expand Down

0 comments on commit ed5afde

Please sign in to comment.