1 Star 0 Fork 0

我还是我 / gortsplib

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

gortsplib

Test Lint Go Report Card CodeCov PkgGoDev

RTSP 1.0 client and server library for the Go programming language, written for MediaMTX.

Go ≥ 1.19 is required.

Features:

  • Client
    • Query servers about available media streams
    • Play (read)
      • Read media streams from servers with the UDP, UDP-multicast or TCP transport protocol
      • Read TLS-encrypted streams (TCP only)
      • Switch transport protocol automatically
      • Read selected media streams
      • Pause or seek without disconnecting from the server
      • Write to ONVIF back channels
      • Get PTS (relative) timestamp of incoming packets
      • Get NTP (absolute) timestamp of incoming packets
    • Record (write)
      • Write media streams to servers with the UDP or TCP transport protocol
      • Write TLS-encrypted streams (TCP only)
      • Switch transport protocol automatically
      • Pause without disconnecting from the server
  • Server
    • Handle requests from clients
    • Record (read)
      • Read media streams from clients with the UDP or TCP transport protocol
      • Read TLS-encrypted streams (TCP only)
      • Get PTS (relative) timestamp of incoming packets
      • Get NTP (absolute) timestamp of incoming packets
    • Play (write)
      • Write media streams to clients with the UDP, UDP-multicast or TCP transport protocol
      • Write TLS-encrypted streams (TCP only)
      • Compute and provide SSRC, RTP-Info to clients
  • Utilities
    • Parse RTSP elements
    • Encode/decode RTP packets into/from codec-specific frames

Table of contents

Examples

API Documentation

Click to open the API Documentation

RTP Payload Formats

In RTSP, media streams are routed between server and clients by using RTP packets, which are encoded in a specific, codec-dependent, format. This library supports formats for the following codecs:

Video

codec documentation encoder and decoder available
AV1 link :heavy_check_mark:
VP9 link :heavy_check_mark:
VP8 link :heavy_check_mark:
H265 link :heavy_check_mark:
H264 link :heavy_check_mark:
MPEG-4 Video (H263, Xvid) link :heavy_check_mark:
MPEG-1/2 Video link :heavy_check_mark:
M-JPEG link :heavy_check_mark:

Audio

codec documentation encoder and decoder available
Opus link :heavy_check_mark:
Vorbis link
MPEG-4 Audio (AAC) link :heavy_check_mark:
MPEG-1/2 Audio (MP3) link :heavy_check_mark:
AC-3 link :heavy_check_mark:
Speex link
G726 link
G722 link :heavy_check_mark:
G711 (PCMA, PCMU) link :heavy_check_mark:
LPCM link :heavy_check_mark:

Other

codec documentation encoder and decoder available
MPEG-TS link

Specifications

name area
RFC2326, RTSP 1.0 protocol
RFC7826, RTSP 2.0 protocol
RFC8866, SDP: Session Description Protocol SDP
RTP Payload Format For AV1 (v1.0) AV1 payload format
RTP Payload Format for VP9 Video VP9 payload format
RFC7741, RTP Payload Format for VP8 Video VP8 payload format
RFC7798, RTP Payload Format for High Efficiency Video Coding (HEVC) H265 payload format
RFC6184, RTP Payload Format for H.264 Video H264 payload format
RFC3640, RTP Payload Format for Transport of MPEG-4 Elementary Streams MPEG-4 audio, MPEG-4 video payload formats
RFC2250, RTP Payload Format for MPEG1/MPEG2 Video MPEG-1 video, MPEG-2 audio, MPEG-TS payload formats
RFC2435, RTP Payload Format for JPEG-compressed Video M-JPEG payload format
RFC7587, RTP Payload Format for the Opus Speech and Audio Codec Opus payload format
RFC5215, RTP Payload Format for Vorbis Encoded Audio Vorbis payload format
RFC4184, RTP Payload Format for AC-3 Audio AC-3 payload format
RFC6416, RTP Payload Format for MPEG-4 Audio/Visual Streams MPEG-4 audio payload format
RFC5574, RTP Payload Format for the Speex Codec Speex payload format
RFC3551, RTP Profile for Audio and Video Conferences with Minimal Control G726, G722, G711, LPCM payload formats
RFC3190, RTP Payload Format for 12-bit DAT Audio and 20- and 24-bit Linear Sampled Audio LPCM payload format
Codec specifications codecs
Golang project layout project layout

Related projects

MIT License Copyright (c) 2020 aler9 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Go 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/likunde_admin/gortsplib.git
git@gitee.com:likunde_admin/gortsplib.git
likunde_admin
gortsplib
gortsplib
main

搜索帮助