mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
cac23fd51244e3bcb49c0dc035b55dd87b229adc
support generic tracks with multiple formats (https://github.com/aler9/rtsp-simple-server/issues/1103)
support generic tracks with multiple formats (https://github.com/aler9/rtsp-simple-server/issues/1103)
support generic tracks with multiple formats (https://github.com/aler9/rtsp-simple-server/issues/1103)
support generic tracks with multiple formats (https://github.com/aler9/rtsp-simple-server/issues/1103)
support generic tracks with multiple formats (https://github.com/aler9/rtsp-simple-server/issues/1103)
support generic tracks with multiple formats (https://github.com/aler9/rtsp-simple-server/issues/1103)
gortsplib
RTSP 1.0 client and server library for the Go programming language, written for rtsp-simple-server.
Go ≥ 1.17 is required.
Features:
- Client
- Query servers about available streams and tracks
- Read
- Read streams from servers with the UDP, UDP-multicast or TCP transport protocol
- Read TLS-encrypted streams (TCP only)
- Switch transport protocol automatically
- Read only selected tracks of a stream
- Pause or seek without disconnecting from the server
- Generate RTCP receiver reports (UDP only)
- Reorder incoming RTP packets (UDP only)
- Publish
- Publish streams to servers with the UDP or TCP transport protocol
- Publish TLS-encrypted streams (TCP only)
- Switch transport protocol automatically
- Pause without disconnecting from the server
- Generate RTCP sender reports
- Server
- Handle requests from clients
- Sessions and connections are independent
- Publish
- Read streams from clients with the UDP or TCP transport protocol
- Read TLS-encrypted streams (TCP only)
- Generate RTCP receiver reports (UDP only)
- Reorder incoming RTP packets (UDP only)
- Read
- Write streams to clients with the UDP, UDP-multicast or TCP transport protocol
- Write TLS-encrypted streams
- Compute and provide SSRC, RTP-Info to clients
- Generate RTCP sender reports
- Utilities
- Parse RTSP elements: requests, responses, SDP
- Parse H264 elements and formats: RTP/H264, Annex-B, AVCC, anti-competition, DTS
- Parse MPEG4-audio (AAC) elements and formats: RTP/MPEG4-audio, ADTS, MPEG4-audio configurations
- Parse Opus elements: RTP/Opus
- Parse VP8 elements: RTP/VP8
- Parse VP9 elements: RTP/VP9
Table of contents
Examples
- client-query
- client-read
- client-read-codec-h264
- client-read-codec-h264-convert-to-jpeg
- client-read-codec-h264-save-to-disk
- client-read-codec-mpeg4audio
- client-read-codec-opus
- client-read-codec-vp8
- client-read-codec-vp9
- client-read-partial
- client-read-options
- client-read-pause
- client-read-republish
- client-publish-codec-h264
- client-publish-codec-mpeg4audio
- client-publish-codec-opus
- client-publish-codec-pcma
- client-publish-codec-pcmu
- client-publish-codec-vp8
- client-publish-codec-vp9
- client-publish-options
- client-publish-pause
- server
- server-tls
- server-h264-save-to-disk
API Documentation
https://pkg.go.dev/github.com/aler9/gortsplib#pkg-index
Links
Related projects
- rtsp-simple-server https://github.com/aler9/rtsp-simple-server
- pion/sdp (SDP library used internally) https://github.com/pion/sdp
- pion/rtp (RTP library used internally) https://github.com/pion/rtp
- pion/rtcp (RTCP library used internally) https://github.com/pion/rtcp
Standards
- RTSP 1.0 https://tools.ietf.org/html/rfc2326
- RTSP 2.0 https://tools.ietf.org/html/rfc7826
- HTTP 1.1 https://tools.ietf.org/html/rfc2616
- Golang project layout https://github.com/golang-standards/project-layout
Languages
Go
99.8%
Makefile
0.2%