From c1393697a37c210a72d3f72e761480ddea31939b Mon Sep 17 00:00:00 2001 From: Malte Rosenbjerg Date: Wed, 15 Apr 2020 16:46:28 +0200 Subject: [PATCH] Add AudioSamplingRateArgument Former-commit-id: bc76d830d4f4a28f0aafcd88c47d2d38dd363592 --- .../Atoms/AudioSamplingRateArgument.cs | 18 ++++++++++++++++++ FFMpegCore/FFMpegCore.csproj | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 FFMpegCore/FFMPEG/Argument/Atoms/AudioSamplingRateArgument.cs diff --git a/FFMpegCore/FFMPEG/Argument/Atoms/AudioSamplingRateArgument.cs b/FFMpegCore/FFMPEG/Argument/Atoms/AudioSamplingRateArgument.cs new file mode 100644 index 0000000..ee612b8 --- /dev/null +++ b/FFMpegCore/FFMPEG/Argument/Atoms/AudioSamplingRateArgument.cs @@ -0,0 +1,18 @@ +namespace FFMpegCore.FFMPEG.Argument +{ + /// + /// Audio sampling rate argument. Defaults to 48000 (Hz) + /// + public class AudioSamplingRateArgument : Argument + { + public AudioSamplingRateArgument() : base(48000) { } + + public AudioSamplingRateArgument(int samplingRate) : base(samplingRate) { } + + /// + public override string GetStringValue() + { + return $"-ar {Value}"; + } + } +} \ No newline at end of file diff --git a/FFMpegCore/FFMpegCore.csproj b/FFMpegCore/FFMpegCore.csproj index f79117b..a3fca0d 100644 --- a/FFMpegCore/FFMpegCore.csproj +++ b/FFMpegCore/FFMpegCore.csproj @@ -10,9 +10,9 @@ 1.0.12 1.1.0.0 1.1.0.0 - Make output file existence check optional + Adds AudioSamplingRateArgument 8 - 1.3.2 + 1.3.3 Vlad Jerca, Malte Rosenbjerg ffmpeg ffprobe convert video audio mediafile resize analyze muxing GitHub