Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Add PCM & FLAC as standard audio encoder options for capturing lossless audio #566

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
14 changes: 13 additions & 1 deletion src/Captura.FFmpeg/Audio/FFmpegAudioItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,24 @@ public IAudioFileWriter GetAudioFileWriter(string FileName, WaveFormat Wf, int A
.AddArg("compression_level", qscale);
};

public static FFmpegAudioArgsProvider Pcm { get; } = (Quality, OutputArgs) =>
{
OutputArgs.SetAudioCodec("copy");
};

public static FFmpegAudioArgsProvider Flac { get; } = (Quality, OutputArgs) =>
{
OutputArgs.SetAudioCodec("flac");
};

public static IEnumerable<FFmpegAudioItem> Items { get; } = new[]
{
new FFmpegAudioItem("AAC", ".aac", Aac),
new FFmpegAudioItem("Mp3", ".mp3", Mp3),
new FFmpegAudioItem("Vorbis", ".ogg", Vorbis),
new FFmpegAudioItem("Opus", ".opus", Opus)
new FFmpegAudioItem("Opus", ".opus", Opus),
new FFmpegAudioItem("PCM", ".wav", Pcm),
new FFmpegAudioItem("FLAC", ".flac", Flac)
};
}
}