All Projects → BogdanovKirill → Rtspclientsharp

BogdanovKirill / Rtspclientsharp

Licence: mit
Pure C# RTSP client for .NET Standard without external dependencies and with true async nature. I welcome contributions.

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Rtspclientsharp

Gb28181.solution
Linux/Win/Docker/kubernetes/Chart/Kustomize/GB28181/SIP/RTP/SDP/WebRTC/作为上下级域/平台级联互联
Stars: ✭ 323 (-7.18%)
Mutual labels:  rtsp, rtp, dotnetcore
Vortice.Vulkan
Cross platform .NET bindings for Vulkan, VMA, SPIRV-Cross and shaderc
Stars: ✭ 172 (-50.57%)
Mutual labels:  dotnetcore, netstandard
DotNetGraph
Create GraphViz DOT graph with .NET / C#
Stars: ✭ 57 (-83.62%)
Mutual labels:  dotnetcore, netstandard
Desktopsharing
桌面共享, 支持RTSP转发, RTSP推流, RTMP推流。
Stars: ✭ 337 (-3.16%)
Mutual labels:  rtsp, rtp
Weihanli.common
common tools,methods,extension methods etc... .net 常用工具类,公共方法,常用扩展方法等,基础类库
Stars: ✭ 152 (-56.32%)
Mutual labels:  netstandard, dotnetcore
Anclafs
ASP.NET Core Library and Framework Support
Stars: ✭ 192 (-44.83%)
Mutual labels:  netstandard, dotnetcore
rtsp-simple-proxy
DEPRECATED - please use https://github.com/aler9/rtsp-simple-server
Stars: ✭ 41 (-88.22%)
Mutual labels:  rtsp, rtp
Networker
A simple to use TCP and UDP networking library for .NET. Compatible with Unity.
Stars: ✭ 408 (+17.24%)
Mutual labels:  netstandard, dotnetcore
ipchub
一个即拷即用、支持摄像头集中管理、多级路由及h5播放的流媒体服务器。
Stars: ✭ 138 (-60.34%)
Mutual labels:  rtsp, rtp
Cosmonaut
🌐 A supercharged Azure CosmosDB .NET SDK with ORM support
Stars: ✭ 309 (-11.21%)
Mutual labels:  netstandard, dotnetcore
useetv-playlist
No description or website provided.
Stars: ✭ 41 (-88.22%)
Mutual labels:  rtsp, rtp
Peachpie
PeachPie - the PHP compiler and runtime for .NET and .NET Core
Stars: ✭ 1,945 (+458.91%)
Mutual labels:  netstandard, dotnetcore
Raft.net
Implementation of RAFT distributed consensus algorithm among TCP Peers on .NET / .NETStandard / .NETCore / dotnet
Stars: ✭ 112 (-67.82%)
Mutual labels:  netstandard, dotnetcore
Netprints
Visual programming for .NET inspired by Unreal Engine's Blueprints
Stars: ✭ 194 (-44.25%)
Mutual labels:  netstandard, dotnetcore
Vortice.windows
.NET standard bindings for DirectX, WIC, Direct2D1, XInput, XAudio and X3DAudio
Stars: ✭ 427 (+22.7%)
Mutual labels:  netstandard, dotnetcore
ZLMediaKit
WebRTC/RTSP/RTMP/HTTP/HLS/HTTP-FLV/WebSocket-FLV/HTTP-TS/HTTP-fMP4/WebSocket-TS/WebSocket-fMP4/GB28181/SRT server and client framework based on C++11
Stars: ✭ 7,790 (+2138.51%)
Mutual labels:  rtsp, rtp
Media Server
RTSP/RTP/RTMP/FLV/HLS/MPEG-TS/MPEG-PS/MPEG-DASH/MP4/fMP4/MKV/WebM
Stars: ✭ 1,363 (+291.67%)
Mutual labels:  rtsp, rtp
Media Stream Library Js
JavaScript library to handle media streams on the command line (Node.js) and in the browser.
Stars: ✭ 192 (-44.83%)
Mutual labels:  rtsp, rtp
rtsp-bench
RTSP -> WebRTC Server that generates a CPU Usage report
Stars: ✭ 125 (-64.08%)
Mutual labels:  rtsp, rtp
Cosmos.Identity
A Cosmos storage provider for ASP.NET Core Identity.
Stars: ✭ 26 (-92.53%)
Mutual labels:  dotnetcore, netstandard

Logo C# RTSP Client for .NET

NuGet version (RtspClientSharp) Build Status

This repo contains C# RTSP client implementation (called "RtspClientSharp") for .NET Standard 2.0

Features

  • Supported transport protocols: TCP/HTTP/UDP
  • Supported media codecs: H.264/MJPEG/AAC/G711A/G711U/PCM/G726
  • No external dependencies, pure C# code
  • Asynchronous nature with cancellation tokens support
  • Designed to be fast and scaleable
  • Low GC pressure during receive stage (when RTSP session is established); low amount of freezes under high load

Installation

The easiest way to get started is to use the NuGet package for RtspClientSharp

You can install using NuGet like this:

nuget install RtspClientSharp

Or select it from the NuGet packages UI on Visual Studio.

On Visual Studio, make sure that you are targeting .NET 4.6.1/.NET Core 2.0 or later, as this package uses some features of newer .NETs. Otherwise, the package will not be added. Once you do this, you can just use the RtspClientSharp nuget

Alternatively, you can download it directly.

Using RtspClientSharp

Something like this:

var serverUri = new Uri("rtsp://192.168.1.77:554/ucast/11");
var credentials = new NetworkCredential("admin", "123456");
var connectionParameters = new ConnectionParameters(serverUri, credentials);
connectionParameters.RtpTransport = RtpTransportProtocol.TCP;
using(var rtspClient = new RtspClient(connectionParameters))
{
    rtspClient.FrameReceived += (sender, frame) =>
    {
        //process (e.g. decode/save to file) encoded frame here or 
        //make deep copy to use it later because frame buffer (see FrameSegment property) will be reused by client
        switch (frame)
        {
            case RawH264IFrame h264IFrame:
            case RawH264PFrame h264PFrame:
            case RawJpegFrame jpegFrame:
            case RawAACFrame aacFrame:
            case RawG711AFrame g711AFrame:
            case RawG711UFrame g711UFrame:
            case RawPCMFrame pcmFrame:
            case RawG726Frame g726Frame:
               break;
        }
    }
	
    await rtspClient.ConnectAsync(token);
    await rtspClient.ReceiveAsync(token);
}

You could find more complex samples here (e.g. simple RTSP player with full frame decoding and rendering processes): https://github.com/BogdanovKirill/RtspClientSharp/tree/master/Examples

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :) You could also make per-feature donations, write me to [email protected]

paypal

Backers

Thank you to all project backers! Especially for:

  • Roman Minyaylov
  • Dat Ta
  • Michael Norman

Sponsors

jetbrains

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].