lay295 / TwitchDownloader

Twitch VOD/Clip Downloader - Chat Download/Render/Replay
MIT License
2.72k stars 260 forks source link

Fixes #848 add CLI mode to manually concatenate ts parts #877

Closed superbonaci closed 11 months ago

superbonaci commented 1 year ago

Fix https://github.com/lay295/TwitchDownloader/issues/848 There's a weird github issue which looks like 2 lines were modified: https://github.com/orgs/community/discussions/72813

superbonaci commented 1 year ago

Looks like visual Studio for Mac introduces weird ends of line and messes up the BOM in files: https://github.com/microsoft/vscode/issues/196905

superbonaci commented 1 year ago

Files have to be created with Visual Studio for Windows, so will open another pull request once it's fixed.

superbonaci commented 1 year ago

Looks like know is kind of fixed.

superbonaci commented 1 year ago

Some of the original .cs files end in newline and other don't, so they are mixed up.

superbonaci commented 1 year ago

I'll make some adjustments to it. What do you suggest instead of this line?

_progress.Report(new ProgressReport(ReportType.Log, $"The following parts appear to be invalid TS files: {string.Join(", ", failedParts)}"));
ScrubN commented 1 year ago

I'll make some adjustments to it. What do you suggest instead of this line?

_progress.Report(new ProgressReport(ReportType.Log, $"The following parts appear to be invalid TS files: {string.Join(", ", failedParts)}"));

Instead of dealing with discrimination, maybe remove the file exist check and let the exception propagate up. Since this is not an automatic process, the user is liable for the files existing.

superbonaci commented 11 months ago

tsmerge to be moved below the primary 5 functions. I do see it being used by some power users, but not nearly enough to warrant being placed above the other functions in the help text & readme.

Concatenating ts parts is certainly a corner case, and for that reason most people rely on tools (like ffmpeg) that at least do something, but they don't achieve a good result. The method implemented by .NET Framework is ideal at least with the samples I've tested. So don't think it's not useful.

I'll made a new pull request with the changes you suggested, hope now they are ok.