Supported video formats
| Struct | Codec | Payload type | RFC / spec | Encoder | Decoder |
|---|---|---|---|---|---|
format.H264 | H.264 / AVC | dynamic (96–127) or 35 | RFC 6184 | Yes | Yes |
format.H265 | H.265 / HEVC | dynamic (96–127) | RFC 7798 | Yes | Yes |
format.AV1 | AV1 | dynamic (96–127) | AV1 RTP Payload v1.0 | Yes | Yes |
format.VP9 | VP9 | dynamic (96–127) | RFC 9628 | Yes | Yes |
format.VP8 | VP8 | dynamic (96–127) | RFC 7741 | Yes | Yes |
format.MJPEG | Motion-JPEG | 26 (static) | RFC 2435 | Yes | Yes |
format.MPEG4Video | MPEG-4 Visual | dynamic (96–127) | RFC 6416 | Yes | Yes |
format.MPEG1Video | MPEG-1/2 Video | 32 (static) | RFC 2250 | Yes | Yes |
H264
H264
Package path:
github.com/bluenviron/gortsplib/v5/pkg/formatSpecification: RFC 6184Struct fields
Recording example
Declare the format when starting a recording session:Playback example
rtph264.ErrNonStartingPacketAndNoPrevious and rtph264.ErrMorePacketsNeeded are non-fatal: the decoder is waiting for more packets to reassemble a complete access unit.H265
H265
AV1
AV1
VP9
VP9
VP8
VP8
M-JPEG
M-JPEG
MPEG-4 Video
MPEG-4 Video