SIPSorceryMedia.Windows
10.0.7
dotnet add package SIPSorceryMedia.Windows --version 10.0.7
NuGet\Install-Package SIPSorceryMedia.Windows -Version 10.0.7
<PackageReference Include="SIPSorceryMedia.Windows" Version="10.0.7" />
<PackageVersion Include="SIPSorceryMedia.Windows" Version="10.0.7" />
<PackageReference Include="SIPSorceryMedia.Windows" />
paket add SIPSorceryMedia.Windows --version 10.0.7
#r "nuget: SIPSorceryMedia.Windows, 10.0.7"
#:package SIPSorceryMedia.Windows@10.0.7
#addin nuget:?package=SIPSorceryMedia.Windows&version=10.0.7
#tool nuget:?package=SIPSorceryMedia.Windows&version=10.0.7
SIPSorceryMedia.Windows
Windows-specific audio capture, audio playback, and video capture end-points for the SIPSorcery real-time communications library. Built on NAudio for audio and Windows Media Foundation for video.
Use this package when:
- You're targeting Windows and want microphone / speaker / webcam access without pulling in FFmpeg.
- You need a quick way to give a SIPSorcery
RTPSessionsomething to send audio from and play received audio into.
For cross-platform audio + video, use SIPSorceryMedia.FFmpeg instead.
Platform support
- Target:
net10.0-windows10.0.17763.0(Windows 10 1809+). - Runtime: Windows only -- the package PInvokes Windows-specific audio and video APIs.
Installation
dotnet add package SIPSorcery
dotnet add package SIPSorceryMedia.Windows
The SIPSorceryMedia.Abstractions interfaces this package implements
come in transitively.
What is in here
| Class | Implements | Purpose |
|---|---|---|
WindowsAudioEndPoint |
IAudioEndPoint (source + sink) |
Microphone capture and speaker playback. Wraps NAudio's WaveInEvent and WaveOutEvent. |
WindowsVideoEndPoint |
IVideoSource |
Webcam capture via Windows Media Foundation. Surfaces enumerated formats and resolutions. |
WindowsAudioSession |
IAudioSession |
Convenience pairing of audio source + sink + encoder. |
The audio end-point automatically resamples between the device's native sample rate and the codec's sample rate (e.g. 48 kHz device, 8 kHz G.711 codec).
Quickstart -- VoIP audio call
The simplest possible example: place an outbound SIP audio call and hear the audio through Windows speakers.
dotnet new console --name SIPGetStarted --framework net10.0-windows10.0.17763.0
cd SIPGetStarted
dotnet add package SIPSorcery
dotnet add package SIPSorceryMedia.Windows
Paste into Program.cs:
using SIPSorcery.Media;
using SIPSorcery.SIP.App;
using SIPSorceryMedia.Windows;
const string DESTINATION = "music@iptel.org";
var userAgent = new SIPUserAgent();
var winAudio = new WindowsAudioEndPoint(new AudioEncoder());
var session = new VoIPMediaSession(winAudio.ToMediaEndPoints());
bool ok = await userAgent.Call(DESTINATION, null, null, session);
Console.WriteLine($"Call result: {(ok ? "success" : "failure")}");
Console.WriteLine("Press any key to hangup.");
Console.ReadLine();
dotnet run -- you should hear the test audio.
Quickstart -- WebRTC video to a browser
The full sample lives at
examples/WebRTCExamples/WebRTCGetStarted.
Pair WindowsVideoEndPoint with a video encoder
(SIPSorceryMedia.FFmpeg's FFmpegVideoEncoder,
SIPSorcery.VP8, or a
custom IVideoEncoder) and feed the encoded samples into
RTCPeerConnection.SendVideo.
Audio sample rate notes
WindowsAudioEndPointdefaults to 8 kHz internal processing -- fine for narrow-band G.711 / G.722 codecs which are the most common in VoIP.- For wide-band Opus or 48 kHz codecs, construct the end-point with
the higher sample rate so internal resampling is minimised:
new WindowsAudioEndPoint(new AudioEncoder(), audioSampleRate: 48000).
Related packages
- SIPSorcery -- the main real-time communications library.
- SIPSorceryMedia.Abstractions -- the interfaces this package implements.
- SIPSorceryMedia.FFmpeg -- cross-platform alternative built on FFmpeg.
License
BSD 3-Clause License. See LICENSE at the repo root.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows10.0.17763 is compatible. |
-
net10.0-windows10.0.17763
- NAudio (>= 2.3.0)
- SIPSorceryMedia.Abstractions (>= 10.0.7)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SIPSorceryMedia.Windows:
| Package | Downloads |
|---|---|
|
Missionware.Cognibase.Comm.Peer.WebRtc.Lib.Windows
The modern communication library for Cognibase that offers WebRtc Peer connectivity implementation |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.7 | 168 | 5/18/2026 |
| 10.0.6 | 313 | 4/28/2026 |
| 10.0.5 | 187 | 4/24/2026 |
| 8.0.14 | 6,366 | 6/1/2025 |
| 8.0.11 | 913 | 5/7/2025 |
| 8.0.7 | 3,994 | 1/4/2025 |
| 6.0.5 | 13,275 | 1/14/2024 |
| 6.0.4 | 2,403 | 1/14/2024 |
| 6.0.3-pre | 8,176 | 4/10/2022 |
| 6.0.1-pre | 3,244 | 11/27/2021 |
| 6.0.0-pre | 916 | 11/27/2021 |
| 0.0.32-pre | 5,800 | 11/25/2021 |
| 0.0.31-pre | 34,455 | 1/21/2021 |
| 0.0.30-pre | 1,202 | 12/27/2020 |
| 0.0.29-pre | 498 | 12/26/2020 |
| 0.0.28-pre | 654 | 12/17/2020 |
| 0.0.27-pre | 10,337 | 11/17/2020 |
| 0.0.26-pre | 601 | 11/17/2020 |
| 0.0.25-pre | 827 | 11/5/2020 |
| 0.0.24-pre | 901 | 10/20/2020 |
-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. Bumped target framework to net10.0.
-v8.0.14: Improvements to audio sink handling and implemented IAudioEndPoint interface.
-v8.0.11: Support more than one audo channel.
-v8.0.7: Updated for changes to abstractions library.
-v6.0.5: Updated for changes to abstractions library.
-v6.0.4: Updated for changes to abstractions library.
-v6.0.1-pre: Fixed invalid cast exception acquiring webcam frames (properly this time, not just in test app).
-v6.0.0-pre: Target .net6 and lastest Windows SDK version.
-v0.0.32-pre: Updated to the latest Windows SDK version.
-v0.0.31-pre: Adjust audio playback rate dependent on selected audio format (fixes G722 playback).
-v0.0.30-pre: Updated to use latest abstractons package with change to IAudioEncoder and IVideoEncoder interfaces.
-v0.0.29-pre: Added new method to list video formats for a Windows video capture device.
-v0.0.28-pre: Removed dependency on SIPSorceryMedia.Encoders. Now using IVideoEncoder interface for more flexibility.
-v0.0.27-pre: Updated to use latest encoders package.
-v0.0.26-pre: Wired up video source raw sample event for convenient hook into locally generated video samples.
-v0.0.25-pre: Updated to use latest abstractions and encoder packages.
-v0.0.24-pre: Fixed endian issue converting microphone samples to signed PCM.
-v0.0.23-pre: Updated for SDP refactor in main library for improved audio and video format management.
-v0.0.21-pre: Updated to use latest abstractions and encoding packages.
-v0.0.20-pre: Refactored encoding functions into SIPSorceryMedia.Encoding.
-v0.0.19-pre: Added support for codec manager.
-v0.0.18-pre: Added events for video and audio source failures.
-v0.0.16-pre: Added webcam support.
-v0.0.15-pre: Initial pre-release