v1.12.3

bluenviron/mediamtxv1.12.3May 27, 2025by github-actions[bot]

AI Summary

This release focuses on enhancing JWT/JWKS authentication security, fixing playback and recording issues with fMP4 segments, and addressing race conditions in WebRTC connections. It also updates the Go language version to 1.24.

Key Highlights

  • Add JWKS rotation API endpoint for enhanced security
  • Do not ask for credentials when authentication method is JWT
  • Fix jerky video playback when recording has B-frames
  • Fix race conditions in WebRTC connection closure
  • Go updated from 1.23 to 1.24

New Features

  • Add JWKS rotation API endpoint
  • Support passing JWTs through the password field
  • Allow disabling JWT in HTTP query parameters
  • Allow using colon in path names
  • Support connecting to sources that require standard credentials

Full Release Notes

## Fixes and improvements

General

* Feat: Add JWKS rotation API endpoint (https://github.com/bluenviron/mediamtx/issues/4463)
* add authJWTJWKSFingerprint (https://github.com/bluenviron/mediamtx/issues/4409) (https://github.com/bluenviron/mediamtx/issues/4514)
* do not ask for credentials when authentication method is JWT (https://github.com/bluenviron/mediamtx/issues/4450) (https://github.com/bluenviron/mediamtx/issues/4513)
* support passing JWTs through the password field (https://github.com/bluenviron/mediamtx/issues/4516). This is safer than passing JWTs through query parameters, unfortunately support is limited.
* parse HTTP username and password OR token, not both (https://github.com/bluenviron/mediamtx/issues/4517)
* allow disabling JWT in HTTP query parameters (https://github.com/bluenviron/mediamtx/issues/4518)
* allow using colon in path names (https://github.com/bluenviron/mediamtx/issues/4377) (https://github.com/bluenviron/mediamtx/issues/4519)
* change recommended OBS settings (https://github.com/bluenviron/mediamtx/issues/4523)
* playback: fix error 404 when seeking before start of segment (https://github.com/bluenviron/mediamtx/issues/4276) (https://github.com/bluenviron/mediamtx/issues/4533) (https://github.com/bluenviron/mediamtx/issues/4539)
* playback: fix jerky video (https://github.com/bluenviron/mediamtx/issues/4555). this happened when recording has B-frames, playback format is fmp4 and starting position doesn't correspond to a IDR frame.
* record: fix loss of audio samples during segment switch (https://github.com/bluenviron/mediamtx/issues/4556)
* Fix: gracefully handle fMP4 segments with missing or partial moof/mdat (https://github.com/bluenviron/mediamtx/issues/4538)
* recorder: fix duration of first part of a segment (https://github.com/bluenviron/mediamtx/issues/4562) 
* recorder: fix segment duration when audio is in advance (https://github.com/bluenviron/mediamtx/issues/4563)
* recorder: improve fMP4 splitting algorithm (https://github.com/bluenviron/mediamtx/issues/4566)
* delete paths that belong to a new configuration (https://github.com/bluenviron/mediamtx/issues/4013) (https://github.com/bluenviron/mediamtx/issues/4568)
* av1: strip size when decoding bitstreams (https://github.com/bluenviron/mediacommon/issues/197)

RTSP

* fix authentication regression (https://github.com/bluenviron/mediamtx/issues/4557) since https://github.com/bluenviron/mediamtx/issues/4267 it was impossible to perform authentication when protocol is RTSP and credentials are hashed.
* fix invalid TID=0 in writeAggregationUnit of rtph265 encoder (https://github.com/bluenviron/gortsplib/issues/782)

RTMP

* fix connect command when reading (https://github.com/bluenviron/mediamtx/issues/4512) when reading, the "connect" command should not contain fpad,capabilities, audioCodecs, videoCodecs, videoFunction.
* support connecting to sources that require standard credentials (https://github.com/bluenviron/mediamtx/issues/4530)

HLS

* fix toggling hlsAlwaysRemux after server is started (https://github.com/bluenviron/mediamtx/issues/4503)
* muxer: return error when timestamp is impossible to handle (https://github.com/bluenviron/gohlslib/issues/233)
* muxer: remove useless computation in MPEG-TS variant (https://github.com/bluenviron/gohlslib/issues/234)

WebRTC

* prevent routine leaks (https://github.com/bluenviron/mediamtx/issues/4558) wait for all routines to exit before assuming a WebRTC connection is closed.
* fix race condition after https://github.com/bluenviron/mediamtx/issues/4558 (https://github.com/bluenviron/mediamtx/issues/4564)

SRT

* set source not ready when reader exits (https://github.com/bluenviron/mediamtx/issues/4467)

Dependencies

* Go updated from 1.23 to 1.24
* code.cloudfoundry.org/bytefmt updated from v0.39.0 to v0.40.0
* github.com/MicahParks/jwkset updated from v0.9.5 to v0.9.6
* github.com/alecthomas/kong updated from v1.10.0 to v1.11.0
* github.com/bluenviron/gohlslib/v2 updated from v2.1.4 to v2.1.5
* github.com/bluenviron/gortsplib/v4 updated from v4.14.0 to v4.14.1
* github.com/bluenviron/mediacommon/v2 updated from v2.1.1 to v2.2.0
* github.com/gin-gonic/gin updated from v1.10.0 to v1.10.1
* github.com/matthewhartstonge/argon2 updated from v1.3.0 to v1.3.1
* github.com/pion/interceptor updated from v0.1.37 to v0.1.38
* github.com/pion/rtp updated from v1.8.15 to v1.8.16
* github.com/pion/sdp/v3 updated from v3.0.11 to v3.0.13
* golang.org/x/crypto updated from v0.37.0 to v0.38.0
* golang.org/x/term updated from v0.31.0 to v0.32.0
* golang.org/x/net updated from v0.39.0 to v0.40.0
* golang.org/x/text updated from v0.24.0 to v0.25.0
* github.com/bluenviron/mediamtx-rpicamera updated from v2.4.1 to v2.4.2

## Security

Binaries have been produced by the [Release workflow](https://github.com/bluenviron/mediamtx/actions/workflows/release.yml) without human intervention.

SHA256 checksums:

* mediamtx_v1.12.3_darwin_amd64.tar.gz edc850106758803f097ae821e60a9de71f13884fe1f9a634f4e7da9e27ad18ea
* mediamtx_v1.12.3_darwin_arm64.tar.gz cc19f3b0ed502ed74c0952c65e5dfeeb95f368948ed0942b47ffbb38065f6e3a
* mediamtx_v1.12.3_linux_amd64.tar.gz 450d1172bf6708cbd630eada115ccfc33453227e16750369113d1dfe34f876d8
* mediamtx_v1.12.3_linux_arm64.tar.gz 61b37116e36417a1afb9395f9f0d0c63d97f30cbdb0e6a6dccf95d69289e97f4
* mediamtx_v1.12.3_linux_armv6.tar.gz 6ff385cc93a0ca6a61401f1553ddfbebdb33b23efc12ff6aac36475446abf341
* mediamtx_v1.12.3_linux_armv7.tar.gz 97c8e9167a8ba06dbe0c3cc86879b109b653d3c4699552dad69509b47d6cd36e
* mediamtx_v1.12.3_windows_amd64.zip d87b5080e5d2f2061b0ea6f4b64945d88ecf8053021b6a121a05b53adb57d3bb