Merge remote-tracking branch 'origin/main'

# Conflicts:
#	FFMpegCore.Test/DownloaderTests.cs
#	FFMpegCore/Helpers/FFMpegDownloader.cs
This commit is contained in:
Kerry Cao 2023-09-06 01:26:56 -06:00
commit ae92e9370c
4 changed files with 29 additions and 3 deletions

View file

@ -0,0 +1,10 @@
namespace FFMpegCore.Arguments
{
/// <summary>
/// Represents a copy codec parameter
/// </summary>
public class CopyCodecArgument : IArgument
{
public string Text => $"-codec copy";
}
}

View file

@ -333,7 +333,10 @@ public static bool SaveM3U8Stream(Uri uri, string output)
}
return FFMpegArguments
.FromUrlInput(uri)
.FromUrlInput(uri, options =>
{
options.WithCopyCodec();
})
.OutputToFile(output)
.ProcessSynchronously();
}

View file

@ -77,6 +77,7 @@ public FFMpegArgumentOptions DeselectStreams(IEnumerable<int> streamIndices, int
public FFMpegArgumentOptions WithAudibleActivationBytes(string activationBytes) => WithArgument(new AudibleEncryptionKeyArgument(activationBytes));
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 WithCopyCodec() => WithArgument(new CopyCodecArgument());
public FFMpegArgumentOptions WithArgument(IArgument argument)
{

View file

@ -87,7 +87,7 @@ FFMpeg.Join(@"..\joined_video.mp4",
``` csharp
FFMpeg.SubVideo(inputPath,
outputPath,
TimeSpan.FromSeconds(0)
TimeSpan.FromSeconds(0),
TimeSpan.FromSeconds(30)
);
```
@ -162,7 +162,19 @@ If you want to use `System.Drawing.Bitmap`s as `IVideoFrame`s, a `BitmapVideoFra
# Binaries
## Installation
## Runtime Auto Installation
You can install a version of ffmpeg suite at runtime using `FFMpegDownloader.DownloadFFMpegSuite();`
Or you can download only the desired binary using `FFMpegDownloader.DownloadFFMpeg()`, `FFMpegDownloader.DownloadFFProbe()`, `FFMpegDownloader.DownloadFFPlay()`.
| OS | Support |
|---------|:-------------------------------------------------:|
| Windows | x64 Fully Supported, x86 Up to version V4.2.1 |
| Mac OSX | NOT YET |
| Linux | NOT YET |
## Manual Installation
If you prefer to manually download them, visit [ffbinaries](https://ffbinaries.com/downloads) or [zeranoe Windows builds](https://ffmpeg.zeranoe.com/builds/).
### Windows (using choco)