LiveStreamingServerNet.Rtmp
0.21.0
dotnet add package LiveStreamingServerNet.Rtmp --version 0.21.0
NuGet\Install-Package LiveStreamingServerNet.Rtmp -Version 0.21.0
<PackageReference Include="LiveStreamingServerNet.Rtmp" Version="0.21.0" />
paket add LiveStreamingServerNet.Rtmp --version 0.21.0
#r "nuget: LiveStreamingServerNet.Rtmp, 0.21.0"
// Install LiveStreamingServerNet.Rtmp as a Cake Addin #addin nuget:?package=LiveStreamingServerNet.Rtmp&version=0.21.0 // Install LiveStreamingServerNet.Rtmp as a Cake Tool #tool nuget:?package=LiveStreamingServerNet.Rtmp&version=0.21.0
Live-Streaming-Server-Net
Live-Streaming-Server-Net is a high-performance and flexible toolset that allows you to build your own live streaming server using .NET.
Please check the documentation for more details.
Features
- RTMP/RTMPS protocol: Supports the RTMP and RTMPS protocols for streaming audio, video, and data.
- RTMP Relay: Supports relaying RTMP streams between servers, allowing building a scalable RTMP server cluster.
- RTMP Client: Provides a client library for connecting to RTMP servers and publishing/subscribing live streams.
- HTTP-FLV/WebSocket-FLV with ASP.NET CORE: Provides support for serving FLV live streams using HTTP-FLV and WebSocket-FLV protocols within an ASP.NET Core application.
- Transmuxing RTMP streams into HLS streams: Allows you to transmux RTMP streams into HLS (HTTP Live Streaming) streams using the built-in HLS transmuxer.
- Transcoding RTMP streams into Adaptive HLS streams: Integrates with FFmpeg to transcode RTMP streams into multiple-bitrate Adaptive HLS streams.
- Integration with FFmpeg: Provides support for processing the incoming RTMP stream with FFmpeg, for example, to create an MP4 archive.
- GOP caching: Supports caching the Group of Pictures (GOP) to ensure immediate availability of live streaming content.
- Custom authorization: Enables you to implement custom authorization mechanisms for accessing live streams.
- Admin panel: Includes an admin panel that provides an user interface for managing and monitoring the live streaming server.
- Cloud Storage Integration: Enabling real-time uploading of HLS files to cloud storage services like Azure Blob Storage, Google Cloud Storage, and AWS S3, which ensures scalable and efficient HLS stream distribution through CDN.
- Codecs: Supports AVC/H.264, HEVC/H.265, AAC, and MP3 codecs.
Quick Start
Run the RTMP Server
Create a .NET 8 console application project and add the dependencies
dotnet new console
dotnet add package LiveStreamingServerNet
dotnet add package Microsoft.Extensions.Logging.Console
Program.cs
using LiveStreamingServerNet;
using Microsoft.Extensions.Logging;
using System.Net;
using var server = LiveStreamingServerBuilder.Create()
.ConfigureLogging(options => options.AddConsole())
.Build();
await server.RunAsync(new IPEndPoint(IPAddress.Any, 1935));
Run the application
dotnet run
Publish a Live Stream
With FFmpeg
Use the following command to publish a video as the live stream using FFmpeg
ffmpeg -re -i <input_file> -c:v libx264 -c:a aac -f flv rtmp://localhost:1935/live/demo
With OBS Studio
- Open OBS Studio and go to "Settings".
- In the "Settings" window, select the "Stream" tab.
- Choose "Custom" as the "Service".
- Enter "Server":
rtmp://localhost:1935/live
and "Stream Key":demo
. - Click "OK" to save the settings.
- Click the "Start Streaming" button in OBS Studio to begin sending live stream to the RTMP server.
Play the Live Stream
With FFplay
Use the following command to play the live stream using FFplay
ffplay rtmp://localhost:1935/live/demo
With VLC Media Player
- Open VLC Media Player.
- Go to the "Media" menu and select "Open Network Stream".
- In the "Network" tab, enter the URL:
rtmp://localhost:1935/live/demo
. - Click the "Play" button to start playing the live stream.
License
This project is licensed under the terms of the MIT license.
Acknowledgments
Special thanks to JetBrains for providing the open-source software license that supports the development of this project.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net7.0
- LiveStreamingServerNet.Networking (>= 0.21.0)
- LiveStreamingServerNet.Utilities (>= 0.21.0)
- mtanksl.ActionMessageFormat (>= 1.0.4)
-
net8.0
- LiveStreamingServerNet.Networking (>= 0.21.0)
- LiveStreamingServerNet.Utilities (>= 0.21.0)
- mtanksl.ActionMessageFormat (>= 1.0.4)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on LiveStreamingServerNet.Rtmp:
Package | Downloads |
---|---|
LiveStreamingServerNet.Rtmp.Server
This package provides the implementation of RTMP server. |
|
LiveStreamingServerNet.Rtmp.Client
This package provides the implementation of RTMP client. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.21.0 | 255 | 12/8/2024 |
0.20.0 | 363 | 11/9/2024 |
0.19.3 | 624 | 10/31/2024 |
0.19.2 | 232 | 10/28/2024 |
0.19.1 | 204 | 10/27/2024 |
0.19.0 | 208 | 10/26/2024 |
0.18.0 | 255 | 10/18/2024 |
0.17.0 | 250 | 10/12/2024 |
0.16.0 | 219 | 10/5/2024 |
0.15.1 | 189 | 10/3/2024 |
0.14.5 | 620 | 9/18/2024 |
0.14.4 | 1,283 | 8/12/2024 |
0.14.3 | 1,123 | 7/20/2024 |
0.14.2 | 120 | 7/13/2024 |
0.14.1 | 846 | 7/13/2024 |
0.14.0 | 302 | 7/2/2024 |
0.13.0 | 235 | 6/16/2024 |
0.12.0 | 218 | 6/8/2024 |
0.11.0 | 202 | 6/1/2024 |
0.10.0 | 218 | 5/28/2024 |
0.9.3 | 185 | 5/17/2024 |
0.9.1 | 281 | 4/27/2024 |
0.9.0 | 268 | 4/13/2024 |
0.8.2 | 112 | 4/2/2024 |
0.8.1 | 164 | 4/1/2024 |
0.8.0 | 159 | 3/31/2024 |
0.7.5 | 169 | 3/31/2024 |
0.7.1 | 131 | 3/25/2024 |
0.7.0 | 258 | 3/24/2024 |
0.6.0 | 172 | 3/10/2024 |
0.5.3 | 159 | 3/1/2024 |
0.5.2 | 144 | 2/18/2024 |
0.5.1 | 158 | 2/3/2024 |
0.5.0 | 155 | 2/1/2024 |
0.4.2 | 130 | 1/28/2024 |
0.4.1 | 144 | 1/28/2024 |
0.4.0 | 157 | 1/19/2024 |
0.3.0 | 153 | 1/14/2024 |
0.2.0 | 146 | 1/14/2024 |
0.1.1 | 152 | 1/13/2024 |