mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 00:24:14 +01:00
Merge branch 'main' into feature/custom-ffprob-arguments
This commit is contained in:
commit
71a55530d3
4 changed files with 16 additions and 2 deletions
10
FFMpegCore/FFMpeg/Arguments/CopyCodecArgument.cs
Normal file
10
FFMpegCore/FFMpeg/Arguments/CopyCodecArgument.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
namespace FFMpegCore.Arguments
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a copy codec parameter
|
||||||
|
/// </summary>
|
||||||
|
public class CopyCodecArgument : IArgument
|
||||||
|
{
|
||||||
|
public string Text => $"-codec copy";
|
||||||
|
}
|
||||||
|
}
|
|
@ -333,7 +333,10 @@ public static bool SaveM3U8Stream(Uri uri, string output)
|
||||||
}
|
}
|
||||||
|
|
||||||
return FFMpegArguments
|
return FFMpegArguments
|
||||||
.FromUrlInput(uri)
|
.FromUrlInput(uri, options =>
|
||||||
|
{
|
||||||
|
options.WithCopyCodec();
|
||||||
|
})
|
||||||
.OutputToFile(output)
|
.OutputToFile(output)
|
||||||
.ProcessSynchronously();
|
.ProcessSynchronously();
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,7 @@ public FFMpegArgumentOptions DeselectStreams(IEnumerable<int> streamIndices, int
|
||||||
public FFMpegArgumentOptions WithAudibleActivationBytes(string activationBytes) => WithArgument(new AudibleEncryptionKeyArgument(activationBytes));
|
public FFMpegArgumentOptions WithAudibleActivationBytes(string activationBytes) => WithArgument(new AudibleEncryptionKeyArgument(activationBytes));
|
||||||
public FFMpegArgumentOptions WithTagVersion(int id3v2Version = 3) => WithArgument(new ID3V2VersionArgument(id3v2Version));
|
public FFMpegArgumentOptions WithTagVersion(int id3v2Version = 3) => WithArgument(new ID3V2VersionArgument(id3v2Version));
|
||||||
public FFMpegArgumentOptions WithGifPaletteArgument(int streamIndex, Size? size, int fps = 12) => WithArgument(new GifPaletteArgument(streamIndex, fps, size));
|
public FFMpegArgumentOptions WithGifPaletteArgument(int streamIndex, Size? size, int fps = 12) => WithArgument(new GifPaletteArgument(streamIndex, fps, size));
|
||||||
|
public FFMpegArgumentOptions WithCopyCodec() => WithArgument(new CopyCodecArgument());
|
||||||
|
|
||||||
public FFMpegArgumentOptions WithArgument(IArgument argument)
|
public FFMpegArgumentOptions WithArgument(IArgument argument)
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,7 +87,7 @@ FFMpeg.Join(@"..\joined_video.mp4",
|
||||||
``` csharp
|
``` csharp
|
||||||
FFMpeg.SubVideo(inputPath,
|
FFMpeg.SubVideo(inputPath,
|
||||||
outputPath,
|
outputPath,
|
||||||
TimeSpan.FromSeconds(0)
|
TimeSpan.FromSeconds(0),
|
||||||
TimeSpan.FromSeconds(30)
|
TimeSpan.FromSeconds(30)
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue