🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

github.com/bluenviron/gortsplib/v4

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/bluenviron/gortsplib/v4

v4.14.1
Source
Go
Version published
Created
Source

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.23 is required.

Features:

  • Client
    • Query servers about available media streams
    • Read media streams from a server ("play")
      • Read streams 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
    • Write media streams to a server ("record")
      • Write streams 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
    • Validate client credentials
    • Read media streams from clients ("record")
      • Read streams 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
    • Serve media streams to clients ("play")
      • Write streams with the UDP, UDP-multicast or TCP transport protocol
      • Write TLS-encrypted streams (TCP only)
      • Compute and provide SSRC, RTP-Info to clients
      • Read ONVIF back channels
  • 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 transmitted by using RTP packets, which are encoded in a specific, codec-dependent, format. This library supports formats for the following codecs:

Video

codecdocumentationencoder and decoder available
AV1link:heavy_check_mark:
VP9link:heavy_check_mark:
VP8link:heavy_check_mark:
H265link:heavy_check_mark:
H264link:heavy_check_mark:
MPEG-4 Video (H263, Xvid)link:heavy_check_mark:
MPEG-1/2 Videolink:heavy_check_mark:
M-JPEGlink:heavy_check_mark:

Audio

codecdocumentationencoder and decoder available
Opuslink:heavy_check_mark:
Vorbislink
MPEG-4 Audio (AAC)link:heavy_check_mark:
MPEG-1/2 Audio (MP3)link:heavy_check_mark:
AC-3link:heavy_check_mark:
Speexlink
G726link
G722link:heavy_check_mark:
G711 (PCMA, PCMU)link:heavy_check_mark:
LPCMlink:heavy_check_mark:

Other

codecdocumentationencoder and decoder available
MPEG-TSlink

Specifications

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

FAQs

Package last updated on 27 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts