mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-30 20:20:34 +12:00
Support audio recording with ddagrab
This commit is contained in:
parent
ea6640c27d
commit
abae07ca7c
|
@ -150,7 +150,7 @@ public string GetFFmpegArgs(bool isCustom = false)
|
|||
}
|
||||
|
||||
// https://ffmpeg.org/ffmpeg-filters.html#ddagrab
|
||||
AppendInputDevice(args, "lavfi", FFmpeg.IsAudioSourceSelected);
|
||||
AppendInputDevice(args, "lavfi", false);
|
||||
args.Append("-i ddagrab=");
|
||||
args.Append($"output_idx={monitorIndex}:"); // DXGI Output Index to capture.
|
||||
args.Append($"draw_mouse={DrawCursor.ToString().ToLowerInvariant()}:"); // Whether to draw the mouse cursor.
|
||||
|
@ -167,6 +167,12 @@ public string GetFFmpegArgs(bool isCustom = false)
|
|||
}
|
||||
|
||||
args.Append(" ");
|
||||
|
||||
if (FFmpeg.IsAudioSourceSelected)
|
||||
{
|
||||
AppendInputDevice(args, "dshow", true);
|
||||
args.Append($"-i audio={Helpers.EscapeCLIText(FFmpeg.AudioSource)} ");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue