A .NET implementation of RTMP live streaming server, supporting HTTP-FLV, WebSocket-FLV, HLS, Kubernetes, cloud storage services integration and more.
A .NET implementation of RTMP live streaming server, supporting HTTP-FLV, WebSocket-FLV, HLS, Kubernetes, cloud storage services integration and more.
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 and code wiki for more details.
Create a .NET 8 console application project and add the dependencies
dotnet new console
dotnet add package LiveStreamingServerNet
dotnet add package Microsoft.Extensions.Logging.ConsoleProgram.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 runUse the following command to publish a video as the live stream using FFmpeg
ffmpeg -re -i -c:v libx264 -c:a aac -f flv rtmp://localhost:1935/live/demortmp://localhost:1935/live and "Stream Key": demo.Use the following command to play the live stream using FFplay
ffplay rtmp://localhost:1935/live/demortmp://localhost:1935/live/demo.Create a ASP.NET CORE 8 Web API application project and add the dependencies
dotnet new webapi
dotnet add package LiveStreamingServerNet
dotnet add package LiveStreamingServerNet.FlvProgram.cs
using System.Net;
using LiveStreamingServerNet;
using LiveStreamingServerNet.Flv.Installer;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddLiveStreamingServer(
new IPEndPoint(IPAddress.Any, 1935),
options => options.AddFlv()
);
var app = builder.Build();
app.UseWebSockets();
app.UseWebSocketFlv();
app.UseHttpFlv();
await app.RunAsync();Run the application
dotnet run --urls="https://+:8080"Given a live stream is published to rtmp://localhost:1935/live/demo
HTTP-FLV
https://localhost:8080/live/demo.flvWebSocket-FLV
wss://localhost:8080/live/demo.flvPlease refer to the LiveStreamServerNet.HlsDemo
Please refer to the LiveStreamServerNet.StandaloneDemo
Package
Latest Version
LiveStreamingServerNet
LiveStreamingServerNet.Standalone
LiveStreamingServerNet.AdminPanelUI
LiveStreamingServerNet.Flv
LiveStreamingServerNet.Networking
LiveStreamingServerNet.Networking.Client
LiveStreamingServerNet.Networking.Server
LiveStreamingServerNet.Rtmp
LiveStreamingServerNet.Rtmp.Client
LiveStreamingServerNet.Rtmp.Relay
LiveStreamingServerNet.Rtmp.Server
LiveStreamingServerNet.StreamProcessor
LiveStreamingServerNet.StreamProcessor.AmazonS3
LiveStreamingServerNet.StreamProcessor.AspNetCore
LiveStreamingServerNet.StreamProcessor.AzureAISpeech
LiveStreamingServerNet.StreamProcessor.AzureBlobStorage
LiveStreamingServerNet.StreamProcessor.GoogleCloudStorage
LiveStreamingServerNet.UtilitiesThis project is licensed under the terms of the MIT license.
Special thanks to JetBrains for providing the open-source software license that supports the development of this project.
No open issues yet, or sync has not completed.