diff --git a/FFMpegCore/FFMpeg/Arguments/MapStreamArgument.cs b/FFMpegCore/FFMpeg/Arguments/MapStreamArgument.cs new file mode 100644 index 0000000..f6d9977 --- /dev/null +++ b/FFMpegCore/FFMpeg/Arguments/MapStreamArgument.cs @@ -0,0 +1,17 @@ +namespace FFMpegCore.Arguments +{ + /// + /// Represents choice of video stream, works with one input file + /// + public class MapStreamArgument : IArgument + { + public readonly int VideoStream; + + public MapStreamArgument(int videoStreamNum) + { + VideoStream = videoStreamNum; + } + + public string Text => $"-map 0:{VideoStream}"; + } +} \ No newline at end of file diff --git a/FFMpegCore/FFMpeg/FFMpegArguments.cs b/FFMpegCore/FFMpeg/FFMpegArguments.cs index b3285f6..db129ee 100644 --- a/FFMpegCore/FFMpeg/FFMpegArguments.cs +++ b/FFMpegCore/FFMpeg/FFMpegArguments.cs @@ -59,7 +59,8 @@ private FFMpegArguments(IInputArgument inputArgument) public FFMpegArguments WithDuration(TimeSpan? duration) => WithArgument(new DurationArgument(duration)); public FFMpegArguments WithFastStart() => WithArgument(new FaststartArgument()); public FFMpegArguments WithFrameOutputCount(int frames) => WithArgument(new FrameOutputCountArgument(frames)); - + public FFMpegArguments WithVideoStream(int videoStreamNumber) => WithArgument(new MapStreamArgument(videoStreamNumber)); + public FFMpegArguments UsingShortest(bool shortest = true) => WithArgument(new ShortestArgument(shortest)); public FFMpegArguments UsingMultithreading(bool multithread) => WithArgument(new ThreadsArgument(multithread)); public FFMpegArguments UsingThreads(int threads) => WithArgument(new ThreadsArgument(threads));