Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing audio issues with muted VODs #1141

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion TwitchDownloaderCore/Tools/FfmpegConcatList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace TwitchDownloaderCore.Tools
{
// https://www.ffmpeg.org/ffmpeg-formats.html#toc-concat-1
// https://www.ffmpeg.org/ffmpeg-formats.html#concat-1
public static class FfmpegConcatList
{
private const string LINE_FEED = "\u000A";
Expand All @@ -27,6 +27,13 @@ public static async Task SerializeAsync(string filePath, M3U8 playlist, Range vi
await sw.WriteAsync(DownloadTools.RemoveQueryString(stream.Path));
await sw.WriteLineAsync('\'');

await sw.WriteLineAsync("stream");
await sw.WriteLineAsync("exact_stream_id 0x100"); // Audio
await sw.WriteLineAsync("stream");
await sw.WriteLineAsync("exact_stream_id 0x101"); // Video
await sw.WriteLineAsync("stream");
await sw.WriteLineAsync("exact_stream_id 0x102?"); // Subtitle

await sw.WriteAsync("duration ");
await sw.WriteLineAsync(stream.PartInfo.Duration.ToString(CultureInfo.InvariantCulture));
}
Expand Down
Loading