SIPSorceryMedia.FFmpeg 10.0.7

There is a newer version of this package available.
See the version list below for details.
dotnet add package SIPSorceryMedia.FFmpeg --version 10.0.7
                    
NuGet\Install-Package SIPSorceryMedia.FFmpeg -Version 10.0.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SIPSorceryMedia.FFmpeg" Version="10.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SIPSorceryMedia.FFmpeg" Version="10.0.7" />
                    
Directory.Packages.props
<PackageReference Include="SIPSorceryMedia.FFmpeg" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SIPSorceryMedia.FFmpeg --version 10.0.7
                    
#r "nuget: SIPSorceryMedia.FFmpeg, 10.0.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SIPSorceryMedia.FFmpeg@10.0.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SIPSorceryMedia.FFmpeg&version=10.0.7
                    
Install as a Cake Addin
#tool nuget:?package=SIPSorceryMedia.FFmpeg&version=10.0.7
                    
Install as a Cake Tool

SIPSorceryMedia.FFmpeg

NuGet NuGet downloads

Cross-platform audio and video media end-points for the SIPSorcery real-time communications library, built on top of native FFmpeg libraries via FFmpeg.AutoGen.

Tested on Windows, macOS, and Linux.

Licence note. Unlike the rest of the SIPSorcery family this package is licensed under LGPL-2.1-only (because it links FFmpeg at runtime, and FFmpeg's default build is LGPL). Make sure that's acceptable for your application before depending on it.

Installation

dotnet add package SIPSorcery
dotnet add package SIPSorceryMedia.FFmpeg

You also need the FFmpeg shared libraries installed on the target machine -- this NuGet package wraps FFmpeg, it doesn't ship the binaries. See Installing FFmpeg below.

What is in here

Codecs

  • Video: VP8, H.264, H.265, MJPEG.
  • Audio: PCMU (G.711), PCMA (G.711), G.722, G.729, Opus.

Sources

Class Source kind
FFmpegFileSource Local files or remote URIs (HTTP, RTSP, ...) -- audio + video.
FFmpegCameraSource Local webcam capture -- video.
FFmpegScreenSource Screen / monitor capture -- video.
FFmpegMicrophoneSource Microphone capture -- audio.

You can mix any video source (or none) with any audio source (or none) when assembling a media session.

Encoders / decoders

Class Purpose
FFmpegVideoEncoder IVideoEncoder -- VP8 / H.264 / H.265 / MJPEG encode + decode.
FFmpegAudioEncoder IAudioEncoder -- audio codec encode + decode for the codecs above.
FFmpegVideoEndPoint Convenience pairing of source + encoder + sink.

Limitations

  • No audio output. This package does not provide a speaker / playback end-point. For audio playback pair it with a platform end-point such as SIPSorceryMedia.Windows on Windows or SIPSorcery.SDL2 on other platforms.

Installing FFmpeg

The shared libraries this package binds to must be discoverable on the target machine's library load path. Typical setups:

Windows

The simplest path is winget:

winget install "FFmpeg (Shared)" --version 8.1

That puts the DLLs somewhere SIPSorceryMedia.FFmpeg can find them.

Alternative -- download a "shared" build from gyan.dev/ffmpeg/builds/#release-builds or use the binaries shipped with FFmpeg.AutoGen, and add them to your PATH.

Linux

sudo apt install ffmpeg

(Equivalent for dnf, pacman, etc. on other distributions.)

macOS

brew install ffmpeg
brew install mono-libgdiplus    # for the test apps that draw bitmaps

FFmpeg version compatibility

This package targets the FFmpeg 8.1 ABI via FFmpeg.AutoGen 8.1.0. Older or much newer FFmpeg installations may load with PInvoke errors. If you see EntryPointNotFoundException or DllNotFoundException at startup, the most common cause is an FFmpeg version mismatch.

Quickstart -- WebRTC video to a browser

The WebRTCTestPatternServer example shows the minimal end-to-end path: a video test-pattern source, encoded with FFmpeg's H.264 encoder, sent over WebRTC to a browser.

Sketch:

using SIPSorcery.Media;
using SIPSorcery.Net;
using SIPSorceryMedia.FFmpeg;

FFmpegInit.Initialise();   // load the shared libs on whatever PATH is configured

var pc = new RTCPeerConnection(null);
var source = new VideoTestPatternSource(new FFmpegVideoEncoder());

var track = new MediaStreamTrack(source.GetVideoSourceFormats(), MediaStreamStatusEnum.SendOnly);
pc.addTrack(track);

source.OnVideoSourceEncodedSample += pc.SendVideo;
pc.OnVideoFormatsNegotiated += formats => source.SetVideoSourceFormat(formats.First());

Testing

The repo includes a console test harness at test/FFmpegFileAndDevicesTest that exercises file, camera, and screen sources end-to-end.

License

LGPL-2.1-only. The rest of the SIPSorcery family is BSD-3-Clause; this package is the exception because of FFmpeg's licensing.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SIPSorceryMedia.FFmpeg:

Package Downloads
SipLib.Video.Windows

A .NET class library for handling video on a Windows PC for use with the SipLib class library

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.8 59 5/23/2026
10.0.7 337 5/18/2026
10.0.5 712 4/24/2026
8.0.12 24,460 6/16/2025
8.0.10 10,043 3/9/2025
8.0.8 2,670 1/11/2025
8.0.7 3,004 1/4/2025
1.4.2 3,479 9/24/2024
1.4.1 8,713 1/14/2024
1.4.0 3,083 1/14/2024
1.3.0-pre 242 1/14/2024
1.2.1 31,528 7/1/2022
1.2.0 778 6/27/2022
1.1.1 949 6/9/2022
1.1.0 2,960 5/4/2022
1.0.0 1,116 4/6/2022
0.0.18-pre 799 2/11/2022
0.0.12-pre 663 12/29/2021
0.0.10-pre 7,792 12/27/2020
0.0.9-pre 664 12/26/2020
Loading failed

-v10.0.7: Updated for main sipsorcery library release.
-v10.0.6: Updated for main sipsorcery library release.
-v10.0.5: Updated for main sipsorcery library release.
-v8.0.12: Updated to latest abstractions package.
-v8.0.10: H265 and MJPEG support. RTCP feedback improvements.
-v8.0.8: Bug fixes, including segfault fix, for FFmpeg file source.
-v8.0.7: Updated to latest abstractions package.
-v1.4.2: Update to FFmpeg.AutoGen v7.0.0.
-v1.4.1: Bump SIPSorceryMedia.Abstractions to 1.2.1.
-v1.4.0: Stable release.
-v1.3.0-pre: Removed FFmpeg binaries from nuget package. On Windows use winget to obtain FFmpeg.
-v1.1.0: Enhance Audio Source encoding. Audio Codecs tested: PCMU (G711), PCMA (G711), G722, G729 and Opus
-v1.0.0: Use SIPSorceryMedia.Abstractions v1.2.0. Add Camera and Monitor detection on MacOs
-v0.0.18-pre: More great work and features from @ChristopheI. Netstandard2.0 target added.
-v0.0.12-pre: New features from @ChristopheI, including camera and microphone sources.
-v0.0.11-pre: Changed target framework from netcoreapp3.1 to netstandard2.1 for wider platform support.
-v0.0.10-pre: Updated to use latest abstractons package with change to IAudioEncoder and IVideoEncoder interfaces.
-v0.0.9-pre: Updated to use latest abstractions nuget package and video format parameter on IVideoSink.GotVideoFrame.
-v0.0.8-pre: Fixed the video decoder to return BGR instead of RGB.
-v0.0.7-pre: Updated the video encoder class to support the IVideoEncoder interface.
-v0.0.6-pre: Updated to use latest abstractions nuget package.
-v0.0.5-pre: Use pixel conversion class from abstractions package.
-v0.0.4-pre: Added codec manager support to FFmpegVideoEndPoint.
-v0.0.3-pre: Fixed bugs passing frames between file source decoder and video encoder.
-v0.0.2-pre: Added file based source.
-v0.0.1-pre: Initial release.