Regira Media provides video processing — compression and snapshot extraction — via FFMpeg.
| Project | Package | Backend |
|---|---|---|
Media.FFMpeg |
Regira.Media.FFMpeg |
FFMpegCore |
<PackageReference Include="Regira.Media.FFMpeg" Version="6.*" />
FFMpeg binaries must be available on PATH or configured via FFMpegCore.GlobalFFOptions.
Implements ICompressService and IVideoService.
var vm = new VideoManager();
VideoSettings? info = await vm.GetInfo(videoFile);
// info.Width, info.Height, info.Duration, info.Codec, …
Encodes to VP9/WebM. Returns null if the source is already smaller than the target.
IMemoryFile? compressed = await vm.Compress(videoFile, new VideoSettings
{
// override resolution, bitrate, codec, etc.
});
Extracts a single frame as an IImageFile.
var snapshots = new SnapshotService(imageService);
IImageFile? thumb = await snapshots.Snapshot(videoFile,
size: new Size2D(640, 360),
time: TimeSpan.FromSeconds(5));
| Parameter | Type | Default | Description |
|---|---|---|---|
input |
IBinaryFile |
(required) | Source video |
size |
Size2D? |
null |
Output dimensions |
time |
TimeSpan? |
null |
Frame position (defaults to first frame) |
SnapshotService requires an IImageService (inject Regira.Drawing.SkiaSharp.Services.ImageService).ffmpeg, ffprobe) on the host.