Repository navigation
Releases: bluenviron/mediamtx
Release list
v1.21.3
Fixes and improvements
General
- http: restore support for HTTP2 requests (#6320) The server was not advertising the HTTP2 protocol in TLS ALPN anymore. Fix this.
- forward: match destinations by configuration when reloading (#6299) ReloadConf compared the old and new destination lists by position, so removing a destination from the middle of the list shifted all the following ones, which were therefore considered changed and restarted (dropping and re-establishing their connections). Match destinations by their configuration instead: adding, removing or reordering destinations only starts or stops the affected ones, and the others keep running. The position reported by the API and used in logs is updated for the destinations that are kept.
- avoid forward destination overlapping (#6324) When the configuration changes and forward destinations are changed, create new forward destinations only after closing existing ones, avoiding double publishers.
- http: log outbound requests (#6325) log outbound HTTP requests with logLevel debug, in the same way as HTTP inbound requests are already logged.
- fix race condition during logger recreation (#6206) (#6326) The logger can be dynamically recreated (for instance, this happens when changing the logLevel), but some components always need it, in particular hooks, which are not shut down unless the entire server is shutting down. Fix this issue by safely reloading the logger configuration without destroying it.
- document link-local IPv6 zone encoding (#6327)
- recorder: fix different time zones in record segment name (#5451) (#6333) Absolute timestamps of frames can have different time zones, in particular, timestamps from HLS sources arrive with their original time zone. When an absolute timestamp is not available, gohlslib uses time.Now(), which has the local time zone, resulting in streams with timestamps with different time zones. Timestamps are used in names of record segments, but they were not normalized and were written with their original time zone, causing confusion and errors in particular when the '%z' placeholder is not used. Fix the issue by normalizing every incoming date to the local time zone before using it as name of a segment.
- add timezone to default recordPath and warn when not present (#6334) recordPath without %z causes segments to be overwritten or placed at wrong time during daylight saving time switches.
- rtmp, recorder, stream: treat H264 recovery point SEI as random access (#6349) Streams without IDR frames use I slices with a recovery point SEI as random access points. The RTMP reader output and the fMP4 recorder only accepted IDR, and the unit remuxer only prepended SPS and PPS on IDR, so the DTS extractor never received an SPS. Use h264.IsRandomAccess, as the MPEG-TS outputs already do.
- mpegts, rtmp: stop silently skipping H264 units without IDR and without non-IDR (#6354)
- recorder: fix height of VP9 tracks in fMP4 recordings (#6359) The fMP4 recorder took the height of a VP9 track from the width in the key frame header, so the init segment declared a square size, for example 1920x1920 instead of 1920x804. Use the height instead.
- docs: suggest to run MediaMTX in a writable folder (#6369) * when running in Docker, use /etc/mediamtx * when running in host Linux, use /usr/local/etc/mediamtx
- recorder: fix timestamps of MPEG-1/2 Audio tracks in fMP4 recordings (#6361) The DTS of every sample was computed as the unit PTS plus the unit PTS, so sample durations in the recording were twice the real ones, and the frames of a unit that holds several of them got the same timestamp. Advance the PTS by the duration of each frame instead, and move the NTP of each frame by the same offset, as the Opus, MPEG-4 Audio and AC-3 cases do.
- recorder: prevent a stream-time discontinuity from inflating fMP4 segment duration (#5984) When an RTP timestamp discontinuity occurs (e.g. after a burst of packet loss), the gap between two consecutive samples can be enormous. In the fMP4 recorder that gap is written as the preceding sample's duration (sample.Duration = nextSample.dts - sample.dts), which pushes the segment's endDTS -- and therefore the duration stamped into the mvhd header and reported to runOnRecordSegmentComplete -- forward by the size of the gap. The existing NTP-vs-stream-time drift detector (added in #5239) only fires on the next sample, by which point the inflated segment has already been flushed and reported (a ~1-minute clip reported as multiple hours). Detect the discontinuity one sample earlier: when the next sample's stream time has drifted from absolute time beyond the tolerance, zero the current sample's duration so the segment is not inflated. The drift detector then resets the recording on the following sample as before. mpegts is unaffected (it checks drift against the current sample before touching the segment). Complements #5126 (negative diff) and #5239 (drift reset).
- close sessions when their JWT expires (#4300) (#5813) (#6389)
- allow HTTP authentication to set a session expiration date (#6391)
- record: fix segments never deleted when the configuration is reloaded often (#6256)
- exit in case of fatal listening errors (#6415)
- stream: fix 8-channel AAC always-available tracks refusing 7.1 publishers (#6414) With an always-available MPEG4Audio track of channelCount 8, a 7.1 AAC publisher is refused with "MPEG-4 audio configuration does not match". The track uses channel configuration 8, which is reserved, while the publisher's configuration is 7. Channel configuration 7 stands for 8 channels. Use configuration 7 for an 8-channel track. Other channel counts are unchanged.
- fix routine leak in CertLoader (#6261) (#6417) make CertLoader.Close() to wait for CertLoader.watch()
- mpegts: fix reading tracks with big video frames (bluenviron/mediacommon#393) (#4791) Big video frames delay audio packets, which are needed to parse tracks. Increase maximum buffer size to account for that.
- mpegts: stop validating AC-3 / EAC-3 frames (bluenviron/mediacommon#395) Validating AC-3 / EAC-3 frames is not important for the MPEG-TS parser to work and decreases performance.
API
- add endpoints to manage internal users (#6293) Add dedicated endpoints to manage specific users without the need of calling config/global/patch with the entire user list, in particular: /v3/config/internal-users/list /v3/config/internal-users/get/{id} /v3/config/internal-users/add /v3/config/internal-users/patch/{id} /v3/config/internal-users/replace/{id} /v3/config/internal-users/delete/{id}
- prevent using internal-users/list with deprecated credentials (#6368)
- fix global/patch with webrtcICEServers or credentials (#6362) (#6365) When the deprecated webrtcICEServers parameter is set, webrtcICEServers2 is filled automatically, but the latter prevents the former from being set through global/patch. Fix this. The same applies to deprecated credentials (readUser, readPass, publishUser, publishPass) and authInternalUsers.
- expose users of MoQ sessions (#6390)
- fix channel count of 8-channel MPEG-4 Audio tracks (#6405) When a path carries an MPEG-4 Audio track with channel configuration 7, for instance AAC in the 7.1 layout, the track is listed with "channelCount": 7 in the codecProps of the tracks2 field of the path API, while it has 8 channels. Tracks with 1 to 6 channels are listed correctly. Channel configuration 7 stands for 8 channels, while the values 1 to 6 are equal to the channel count. Report 8 for configuration 7.
- add duration to fmp4 record segments (#6412)
Media-Over-QUIC
- send client SETUP without waiting for server one (#6396)
- log every inbound and outbound message (#6404)
- fix channel count of 8-channel MPEG-4 Audio tracks (#6406) A MoQ client reading a 7.1 AAC path gets "channels": 7 in the catalog, while the track has 8 channels. A MoQ source or publisher sending "channels": 8 gets channel configuration 8, which is reserved. Channel configuration 7 stands for 8 channels. Report 8 for configuration 7 and use configuration 7 for 8 channels, so a relay of a 7.1 track keeps configuration 7. Other values are unchanged...
v1.21.2
Fixes and improvements
General
- fix dropping UDP packets during connection close (#6278) UDP packets were dropped in case of errors regardless of their size. Now they are dropped only if they are empty and there's an error.
- docs: fix youtube rtmps URL (#6286) The rtmps URL for Youtube was wrong. The fingerprint is not required anymore.
- prevent free access to playback server in case of legacy credentials (#6311) When legacy credentials are in use (readUser, readPass, publishUser, publishPass), access to the playback server is granted to anyone. Prevent this by granting access only to users using readUser, readPass.
- auth: skip JWKS fetch when no JWT is provided (#6274) authenticateJWT fetched the JWKS before checking whether the request carried a token at all. Every anonymous request, such as the first unauthenticatedRTSP DESCRIBE or HLS request that precedes a 401, caused an outbound request to the JWKS server while holding the manager's write lock. An unauthenticated client could therefore make the server contact the identity provider at will and, while that endpoint was slow or unreachable, stall JWT authentication for everybody. Return "JWT not provided" before touching the JWKS. Also check the JWKS response status code. A non-2xx reply was fed straight to the JSON decoder, so an error page surfaced as a confusing parse error,and an error reply that happened to hold valid JSON was cached as the key set for an hour. Reject it with the status code, as authenticateHTTP already does. Behavior for requests that carry a token against a healthy JWKS server is unchanged.
- rewindablereader: fix possible OOM (bluenviron/mediacommon#383) empty datagram packets might cause the allocation of unnecessary entries. Fix that.
- h264: revert bluenviron/mediacommon#142 (bluenviron/mediacommon#384) supporting standalone SEI units should not be necessary anymore since these are filtered out at the root (bluenviron/gortsplib#1184). In case of any issue that should arise after this change, open a bug report and we'll adjust things accordingly.
- h264: support SEI recovery point in DTS extractor (bluenviron/mediacommon#341) Treat a SEI recovery point message (payload type 6) as a random access point, similarly to a CRA in H265, so the DTS extractor can (re)initialize its state from the first coded frame that follows the recovery point.
API
- fix race condition when kicking RTSP sessions (#6260) (#6275)
- do not change passwords when their value is "" (#6141) (https://github.com/bluenviron/mediamtx/issues/6287) (#6292) some users call /config/global/get and passits content to /config/global/patch. Since the former now redacts passwords and replaces their value with "", this string is used as an effective password, breaking authentication. Now password values equal to "" are ignored by /config/global/patch, and the original password value is kept unchanged.
- fix deadlock when reloading the API (#6280) (#6279) (#6310) When the API is closing, a /config endpoint might be waiting on the server to reply, but the server is busy waiting on all API endpoints to return, causing a deadlock. Fix this by canceling requests from API endpoints to the server when the API is closing.
Media-Over-QUIC
- use "catalog" as catalog track name (#6268) Previously, the catalog track name was ".catalog" which is non-standard.
RTSP
- stop forwarding in case of read errors (#6266)
- apply path-level rtspUDPReadBufferSize to the first connection (#6291) The RTSP static source built its client before reading the path-level rtspUDPReadBufferSize, so the value only reached the client after a reconnection. Compute it before creating the client, as the MPEG-TS and RTP sources do and as this source did before #5488.
- server: change error return code of some methods (bluenviron/gortsplib#1091) (bluenviron/gortsplib#1174)
- drop standalone H264/H265 trailing SEIs (bluenviron/gortsplib#1184) #3614 bluenviron/mediacommon#142 #6257 bluenviron/mediacommon#382 H264/H265 access units containing a single SEI only, trailing other units, generated by someTP-Link/Tapo cameras, are non-standard and cause several issues in downstream components, including the DTS extractor and the recorder. Previously, the H265 DTS extractor was adjusted to support such units (bluenviron/gortsplib#142) but the problem represented itself with H265. Filter these units out at the root.
- make all decoders return at least 1 byte (bluenviron/gortsplib#1185)
- complete RTP/JPEG implementation (bluenviron/gortsplib#1187) add support for restart headers, limit support to JPEG types 0 and 1.
RTMP
- detect read errors even when the server is writing (#6267) Until now we relied exclusively on write errors to detect broken RTMP connections. Now read errors are checked too.
- make rawmessage.Write thread-safe (bluenviron/gortmplib#136)
- writer: drain inbound messages (#5776) (bluenviron/gortmplib#132) Some servers periodically send messages even when we're publishing. If they are not read, they fill an internal connectionbuffer and cause periodic disconnections. Now the Writer also drains inbound messages.
- reader: support FLV video command frames and skip empty audio messages (bluenviron/gortmplib#128) Someservers (e.g. Wowza Streaming Engine) send a video info/command frame before the first frame: a 2-byte message with frame type 5 and a single command byte (start of seek / end of seek). Video.unmarshal rejected it on length, aborting the whole connection. Add Video.FrameType (key frame, inter frame, command) and Video.Command, deprecate Video.IsKeyFrame in favour of FrameType, and skip command frames in Reader since they carry no data. Some servers (e.g. Wowza Streaming Engine) send an audio message with an empty bodybefore the first frame. allocateMessage rejected it with "not enough bytes", aborting the whole connection. Parse an empty body into an Audio with Codec = 0 and no other field, marshal it back to an empty body, and skip such messages in Reader since they carry no data, like FFmpeg does.
- rename message.Video.Type into message.Video.PacketType (bluenviron/gortmplib#138) This is to avoid confusion with the new message.Video.FrameType field.
HLS
- muxer: keep EXT-X-MAP in delta updates (bluenviron/gohlslib#397) Delta updates were generated without EXT-X-MAP, although all tags that are not skipped must remain in them. Apple clients stop playback (MoofManifold -16046) at the first delta update that skips a segment after delta updates without skipped segments.
WebRTC
- fix panic with specially-crafted WHEP requests (#6301) (#6309) this happened in case of WHEP requests with no media descriptions in the SDP.
Dependencies
- Go updated from 1.26 to 1.27
- code.cloudfoundry.org/bytefmt updated from v0.90.0 to v0.92.0
- github.com/bluenviron/gohlslib/v2 updated from v2.4.5 to v2.4.6
- github.com/bluenviron/gortmplib updated from v1.0.3 to v1.0.4
- github.com/bluenviron/gortsplib/v5 updated from v5.6.6 to v5.6.7
- github.com/bluenviron/mediacommon/v2 updated from v2.9.5 to v2.9.6
- github.com/datarhei/gosrt updated from v0.11.1-0.20260812091715-a77b40bb4b76 to v0.12.0
- github.com/gin-contrib/pprof updated from v1.5.5 to v1.5.6
- github.com/go-git/go-billy/v5 updated from v5.9.1 to v5.9.2
- github.com/go-git/go-git/v5 updated from v5.19.2 to v5.19.3
- github.com/pion/ice/v4 updated from v4.4.2 to v4.4.5
- github.com/pion/interceptor updated from v0.1.48 to v0.1.49
- github.com/pion/rtcp updated from v1.2.17 to v1.2.19
- github.com/pion/transport/v4 removed
- github.com/pion/webrtc/v4 updated from v4.2.20 to v4.2.22
- github.com/quic-go/quic-go updated from v0.62.0 to v0.63.0
- github.com/pion/datachannel updated from v1.6.2 to v1.6.3
- github.com/pion/dtls/v3 updated from v3.1.8 to v3.1.9
- github.com/pion/mdns/v2 updated from v2.2.0 to v2.2.2
- github.com/pion/sctp updated from v1.11.1 to v1.11.3
- github.com/pion/srtp/v3 updated from v3.0.15 to v3.1.3
- github.com/pion/stun/v4 updated from v4.0.0 to v4.0.1
- github.com/pion/turn/v5 updated from v5.1.0 to v5.1.2
- github.com/pjbgf/sha1cd updated from v0.6.0 to v0.7.0
- github.com/pion/transport/v5 v5.1.1 added
Security
Binaries are compiled from source code by the Release workflow, which is a fully-visible process that prevents any change or external interference in produced artifacts.
Checksums of binaries are also published in a public blockchain by usi...
v1.21.1
Fixes and improvements
General
- require browser POST requests to have an allowed origin (#6238) Browsers can send POST requests without performing any preflight request and without checking whether the request origin is present in Access-Control-Allow-Origin. Intercept these requests and check server-side whether the origin is allowed, blocking the request if it is not.
- conf: fix comparison and sharing of the default authInternalUsers (#6205)
- h265: fix DTS extraction of streams with long-term reference pictures (bluenviron/mediacommon#371)
- pmp4: support stsz with a constant sample size (#5803) (bluenviron/mediacommon#373)
- pmp4, fmp4: restore check on inbound H265 SPS (bluenviron/mediacommon#374) A valid H265 SPS is required for marshaling back an MP4, so we have to resume checking them.
- pmp4: support tracks without edts (bluenviron/mediacommon#375) The edit box is optional (ISO/IEC 14496-12, 8.6.5), but tracks without it were rejected with "unexpected box 'mdia'".
- pmp4: return seek errors from GetPayload (bluenviron/mediacommon#376) GetPayload checked the wrong variable after seeking, therefore a failed seek was ignored and the payload was read from the current position of the reader.
- pmp4, fmp4: correctly fill HvcC NumTemporalLayers / TemporalIdNested from SPS (bluenviron/mediacommon#379)
- pmp4: support tracks longer than 2^32 ticks (bluenviron/mediacommon#377)
RTSP
- rtpmjpeg: reject reserved quantization value 127 (bluenviron/gortsplib#1161) RFC 2435 reserves quantization values 100-127, but the guard used
Quantization < 127 - mpeg4audiolatm: don't panic on a layer that reuses the config (bluenviron/gortsplib#1162)
- sdp: support oversized numbers in origin (#5949) (bluenviron/gortsplib#1171)
RTMP
- correctly fill HvcC NumTemporalLayers / TemporalIdNested from SPS (bluenviron/gortmplib#129)
- reader: support standalone SEIs from DJI drones (#5221) (bluenviron/gortmplib#130)
HLS
- make the server manage sessions (#6239) Sessions are now managed by the HLS server, detaching their lifecycle from muxers. This also comes with a performance improvement, since finding a session now traverses a single mutex, and not two channels like before.
- return 404 when a session is valid but muxer is closed (#5736) (#6240) HLS sessions are now kept open for up to 30 seconds after a muxer is closed. This allows the server to handle incoming requests belonging to these sessions and to classify then as 404 rather than 401.
- change error returned in case session is not found (#6241) match the RTSP behavior and return a "session not found" message rather than an "authentication error", which is reserved for creating sessions, not for using them.
- muxer: return 404 when closed (bluenviron/gohlslib#394)
WebRTC
- fix AV1 getting stuck by stripping padding (#5632) (#5774) (#6242) AV1 OBU padding is generated by several encoders. Stripping it has been demonstrated to solve most situations in which browsers get stuck when playing such streams.
- fix stuck decoding with DJI drones (#5221) (#6051) (#6243) Streams from DJI drones contain SEI units with payload type 5 and a specific UUID that seem to cause stuck videos on Chrome and Firefox. Filter out these units.
- add ability to exclude interfaces (#5788)
Dependencies
- code.cloudfoundry.org/bytefmt updated from v0.88.0 to v0.90.0
- github.com/MicahParks/keyfunc/v3 updated from v3.8.1 to v3.8.2
- github.com/abema/go-mp4 updated from v1.7.1 to v1.7.3
- github.com/bluenviron/gohlslib/v2 updated from v2.4.4 to v2.4.5
- github.com/bluenviron/gortmplib updated from v1.0.2 to v1.0.3
- github.com/bluenviron/gortsplib/v5 updated from v5.6.5 to v5.6.6
- github.com/bluenviron/mediacommon/v2 updated from v2.9.4 to v2.9.5
- github.com/gin-contrib/pprof updated from v1.5.4 to v1.5.5
- github.com/matthewhartstonge/argon2 updated from v1.5.7 to v1.6.3
- github.com/pion/ice/v4 updated from v4.4.1 to v4.4.2
- github.com/pion/interceptor updated from v0.1.47 to v0.1.48
- github.com/pion/sdp/v3 updated from v3.0.19 to v3.0.20
- github.com/pion/transport/v4 updated from v4.1.0 to v4.1.1
- github.com/pion/webrtc/v4 updated from v4.2.19 to v4.2.20
- golang.org/x/crypto updated from v0.55.0 to v0.57.0
- golang.org/x/net updated from v0.58.0 to v0.59.0
- golang.org/x/sync updated from v0.22.0 to v0.23.0
- golang.org/x/sys updated from v0.47.0 to v0.48.0
- golang.org/x/term updated from v0.45.0 to v0.46.0
- github.com/bytedance/gopkg updated from v0.1.3 to v0.1.4
- github.com/bytedance/sonic updated from v1.15.0 to v1.15.2
- github.com/bytedance/sonic/loader updated from v0.5.0 to v0.5.1
- github.com/cloudwego/base64x updated from v0.1.6 to v0.1.7
- github.com/gabriel-vasile/mimetype updated from v1.4.12 to v1.4.13
- github.com/gin-contrib/sse updated from v1.1.0 to v1.1.1
- github.com/go-playground/validator/v10 updated from v10.30.1 to v10.30.3
- github.com/goccy/go-json updated from v0.10.5 to v0.10.6
- github.com/klauspost/cpuid/v2 updated from v2.3.0 to v2.4.0
- github.com/mattn/go-isatty updated from v0.0.20 to v0.0.23
- github.com/pelletier/go-toml/v2 updated from v2.2.4 to v2.4.3
- github.com/pion/dtls/v3 updated from v3.1.5 to v3.1.8
- github.com/pion/mdns/v2 updated from v2.1.0 to v2.2.0
- github.com/pion/srtp/v3 updated from v3.0.13 to v3.0.15
- github.com/pion/stun/v3 removed
- github.com/pion/turn/v5 updated from v5.0.13 to v5.1.0
- go.mongodb.org/mongo-driver/v2 updated from v2.5.0 to v2.8.0
- golang.org/x/arch updated from v0.22.0 to v0.29.0
- golang.org/x/text updated from v0.41.0 to v0.42.0
- google.golang.org/protobuf updated from v1.36.10 to v1.36.11
- github.com/pion/stun/v4 v4.0.0 added
- hls.js updated from v1.7.2 to v1.7.3
Security
Binaries are compiled from source code by the Release workflow, which is a fully-visible process that prevents any change or external interference in produced artifacts.
Checksums of binaries are also published in a public blockchain by using GitHub Attestations, and they can be verified by running:
ls mediamtx_* | xargs -L1 gh attestation verify --repo bluenviron/mediamtx
You can verify checksums of binaries by downloading checksums.sha256 and running:
cat checksums.sha256 | grep "$(ls mediamtx_*)" | sha256sum --check
v1.21.0
New major features
Media-over-QUIC
- support forwarding streams (#6145)
API
- add /paths/static-sources/get endpoint (#6177) this allows to obtain details about static sources.
- add type-specific properties to forward destinations (#6178)
- add type-specific properties to static sources (#6184)
Fixes and improvements
General
- add --validate-conf flag (#5549) (#6140)
- use internal/core/VERSION as single source of truth to get version (#6119)
- httpp: propagate Flush() through the response writer wrappers (#6126) handlerLogger's responseRecorder and handlerWriteTimeout's writeTimeoutWriter both wrap http.ResponseWriter but implement neither http.Flusher nor Unwrap(). Any handler that flushes mid-response has that flush silently dropped, and its output only reaches the client when the handler returns. That defeats the stated purpose of writeTimeoutWriter, whose own comment says it exists so one can "write long responses, splitted in chunks, without causing timeouts": the deadline is reset per Write(), but nothing ever leaves the buffer until the end. Found while adding a server-sent-events endpoint: events written and flushed at t=0.4s onlyreached the client at t=2.2s, when the handler returned. Adding Flush() plus Unwrap() (so http.ResponseController can reach through) fixes both. The new test drives a real listener throughboth wrappers and reads while the handler is still blocked, so it fails on the current code by hitting the read deadline.
- support setting read buffer size on macOS (#6128) (#6131)
- drop support for Debian Bullseye (#6137) Bullseye reached EOL on 31st august 2026.
- emit "closed" log message when a server is closed (#6152)
- fix external command exit code reporting on non-Windows platforms (#6155)
- conf: support YAML version directives (#6157)
- metrics: add 'pos' property to forward_dests (#6183)
- metrics: deprecate the 'remoteAddr' property (#6174) Metrics are meant to provide aggregate statistics, not per-peer properties, that can be accessed through the API. The property is still served to keep backward compatibility.
- metrics: add 'type' to forward dests, deprecated 'protocol' (#6170) 'type' is aligned with the terminology used in the rest of the server.
- metrics, pprof: set default Allow-Origins to empty list (#6165) This prevents cross-site attacks to the API with the default configuration.
- always-available: support disabling recording when the source is offline (#6182) Add
alwaysAvailableRecordedparameter that controls whether recording happens during offline periods for always-available paths. When set to false, recording only starts when a real source is connected. - allow sources and forward destinations with an empty password (#6193) Restore the behavior introduced in #395 and accidentally reverted by #5779, which factored the RTMP/HLS credential check into validateURL() and applied it to RTSP sources too. A username with an explicitly empty password is valid per RFC 3986 and is required by some legacy cameras whose password cannot be set. It is now accepted for every scheme handled by validateURL(), including forward destinations. A username without password or a password without username is still rejected,with a clearer error message pointing to the right syntax.
- fix wrong validation of HTTP allowed origins (#6198) An allowed origin with wildcards was making the server accept origins with a different scheme. This is fixed.
- fix HTTP allowed origins dots being interpreter as any character (#6199) A dot in an HTTP allowed origin now requires a corresponding dot in an incoming origin.
- serve Origin: Vary header with Access-Control-Allow-Origin (#6200) This prevents CDNs from caching the Access-Control-Allow-Origin header regardless of the origin.
- stop returning wildcard in Access-Control-Allow-Origin (#6201) if domain is allowed, return the domain, otherwise nothing.
- pmp4, fmp4: stop validating inbound H264/H265 SPS (bluenviron/mediacommon#366) Validating SPS adds latency and is generally redundant.
- pmp4, fmp4: do not accept empty H264/H265 parameters (bluenviron/mediacommon#367)
- h265: fix DTS extraction of streams with temporal sub-layers (bluenviron/mediacommon#368) The picture-type switches in the H265 DTS extractor accepted only TRAIL_N/TRAIL_R/RASL_N/RASL_R, so an access unit whose slices are TSA_N/TSA_R/STSA_N/STSA_R (Rec. ITU-T H.265, table 7-1, types 2-5) fell through to "access unit doesn't contain an IDR or non-IDR NALU" and the stream could never be recorded. TSA and STSA pictures use the same slice segment header syntax as TRAIL pictures, so handle them in the same way.
API
- add 'type' to forward dests, deprecated 'protocol' (#6170) 'type' is aligned with the terminology used in the rest of the server.
- set default Allow-Origins to empty list (#6165) This prevents cross-site attacks to the API with the default configuration.
- deprecate 'conf' field of forward destinations (#6175) configuration is already available through the confName property of the path.
- refactor endpoint names (#6172) group endpoints by category (i.e. /hls/muxers, /hls/sessions), rename /forward/* into /forward-dests/*, use kebab-case. Backward compatibility is preserved by still serving old endpoints.
Media-Over-QUIC
- rename boolean header fields (#6148) rename Properties into HasProperties, FirstObject into IsFirstObject
- add shared Conn interface (#6149)
- close server streams when no longer in use (#6151) Explicitly close bidirectional and unidirectional streams that were previously keep open for the entire duration of the session. Note that closing a stream in QUIC/WebTransport means telling the peer that "we are not sending data anymore", while still allowing inbound data.
- add shared client (#6150)
- impose a 100MB limit on reordered bytes per session (#6194) previously, the limit was per-track. This decreases the probability of incurring in an out-of-memory situations.
RTSP
- redact credentials in logs (#6158)
- demux MPEG-TS from static source pull (#6181) When rtspDemuxMpegts is set, a pulled single MP2T track is demuxed into elementary streams, matching RTSP publishers, so HLS can attach.
- support setting read buffer size on macOS (#6128) (bluenviron/gortsplib#1143)
- client: ignore invalid source IPs in SETUP responses (bluenviron/gortsplib#1070) (bluenviron/gortsplib#1145)
- fix decoding and encoding fragmented MPEG-4 audio packets (bluenviron/gortsplib#1150) The AU-size field was set incorrectly in subsequent fragments.
- stop validating inbound H264/H265 SPS (bluenviron/gortsplib#1151) Validating SPS adds latency and is generally redundant.
- Support SDES (RFC 4568) SRTP key exchange for RTSP/RTSPS sources (bluenviron/gortsplib#1148)
- rtpklv: do not reuse buffer of returned KLV units (bluenviron/gortsplib#1154) Decode() returns a slice that points to the decoder's internal buffer, and the next call to Decode() overwrites that same array in place. A caller that holds the previous unit - for instance while it is being recorded or forwarded on another goroutine - ends up reading the bytes of the next unit, or a torn mix of both when the sizes differ. Clear the buffer instead of truncating it, so each unit gets its own array. This is what the h264, h265, av1, vp8 andmpeg1video decoders already do, at the cost of one allocation per unit.
- auth: support qop=auth in digest client (bluenviron/gortsplib#1074) (bluenviron/gortsplib#1155) The client never looked at the qop directive of a digest challenge and always computed the legacy RFC 2069 response, so servers that require qop="auth" - as most RFC 7616 implementations do - rejected every request with a 401. Parse qop in WWW-Authenticate, and when the server offers "auth", send qop, cnonce and nc and compute the response as H(HA1:nonce:nc:cnonce:qop:HA2) (RFC 7616, section 3.4.1). The nonce count increases at every request, as required. Chal...
v1.20.1
Fixes and improvements
General
- prevent spamming of 'stream is closed' error during shutdown (#6062)
- impose a minimum value to clock rate of always-available tracks (#6086) Clock rates below 10 caused the emission of empty samples. Fix the issue by imposing a minimum value of 8khz, that rises to 22khz in case of AAC.
- fix race condition during sub-stream creation (#6075) (#6095) When a stream with always-available turned on switches from offline to online, or from a publisher to another, the reader mutex was not acquired during writing of codec parameters. This is now fixed.
- restore ability to run the server in a read-only file system (#6098) This was temporarily lost after the introduction of the native MoQ QUIC listener.
- fix deadlock when changing configuration through file and API (#6077) (#6101) When changing configuration in parallel by editing the configuration file and calling the API, the server could get into a deadlock that prevented any further action. This is fixed.
- change default value of authHTTPExclude (#6103) by default, do not exclude any action from HTTP authentication. Old value triggered several security warnings.
- add destFingerprint parameter (#6106) this allows to validate self-signed certificates of forward destinations.
- pmp4: fix panic in case of bad input (bluenviron/mediacommon#354) the stsc box was not checked properly. This is now fixed.
- pmp4: fix panic in case of bad input (bluenviron/mediacommon#355) The parser was not checking that the MP4 was properly sending addresses of samples, resulting in samples with invalid addresses. This is now fixed.
- pmp4, fmp4: do not emit empty payloads (bluenviron/mediacommon#353)
API
- redact password in responses (#6110) passwords are not exposed anymore through the API. They can only be set, not read.
Media-Over-QUIC
- support pulling streams from other servers (#6111)
- do not accept empty payloads (#6085)
- limit maximum amount of published tracks (#6087) this prevents clients from consuming an excessive amount of memory.
- make /moq URL suffix optional (#6107) In order to establish a MoQ session with WebTransport, a /moq suffix was required until now. This is now optional in order to allow connecting to the server with the standard MoQ URL format.
- impose maximum size on pending reordered bytes (#6112) Decrease the maximum memory that clients can take by imposing a maximum size of 100MB on the pending reordered bytes.
RTSP
- accept relative digest URI (bluenviron/gortsplib#1118) RFC 2617 section 3.2.2 allows the digest URI to be either an absolute URI or a relative path. Some clients use the latter, which was rejected with "wrong URL" since urlMatches only accepted an exact match against the absolute request URL.
- send initial RTCP sender report without waiting for a period (bluenviron/gortsplib#1052) (bluenviron/gortsplib#1111) (bluenviron/gortsplib#1120) Reports were emitted only on the ticker, so the first one arrived Period after Initialize (10s by default) and later still when no RTP packet had been sent by that first tick, since report() returns nil until then and the next opportunity is another Period away.
- ensure that decoders can produce only output that does not crash encoders (bluenviron/gortsplib#1123)
- discard empty Opus and G722 RTP packets (bluenviron/gortsplib#1131)
- improve error message when setting read buffer fails (bluenviron/gortsplib#1133)
- server: fix race condition when recording (bluenviron/gortsplib#1134) state was not protected.
RTMP
-
inform about authentication failures (#5657) (#6072) Reply with NetStream.Play.Failed or NetStream.Publish.Unauthorized when a client is not authorized to play or publish. This makes clients like OBS to stop recreating the connection in case of authentication failures.
-
reader: do not emit empty frames (bluenviron/gortmplib#106)
-
parse video PTS delta as signed (bluenviron/gortmplib#88)
HLS -
prefer hls.js on iOS too (#6090) In the embedded HLS reader, use hls.js on iOS, that was previously disabled due to compatibility issues that should have been solved.
-
unlock the session-in-query+iOS combination (#6088) this was previously blocked because the session in query was meant to be dynamic, therefore incompatible with static playlists required by iOS. It is not anymore, so we can support that.
-
stop using cookies with plain HTTP (#6089) in case of plain HTTP, fall back to query parameters, which are safer than HTTP cookies because they are not shared between different pages/domains, although they are visible in the URL.
WebRTC
- support forwarding streams (#6099)
- fix warning when IPv6 is disabled (#5733) (#6048)
- improve performance by ignoring mDNS candidates (#4963) (#6064) mDNS candidates sometimes require a large CPU portion, they are not involved in any connectivity method mentioned in the documentation, they work in local networks only.
SRT
- apply UDP read buffer size from configuration (#6069) Use upstream datarhei/gosrt's ListenerControl config field (datarhei/gosrt#144) to set SO_RCVBUF on the SRT listener's UDP socket.
RPI Camera
- fix crash when secondary stream is enabled (#6060) (#6061)
- prevent invalid MJPEG sizes (#6080) width and height of MJPEG frames must be multiple of 8 and less than 2048, otherwise they cannot be routed with RTP/RTSP.
Dependencies
- code.cloudfoundry.org/bytefmt updated from v0.83.0 to v0.85.0
- github.com/alecthomas/kong updated from v1.16.0 to v1.16.1
- github.com/asticode/go-astits updated from v1.15.0 to v1.16.0
- github.com/bluenviron/gohlslib/v2 updated from v2.4.2 to v2.4.3
- github.com/bluenviron/gortmplib updated from v1.0.0 to v1.0.1
- github.com/bluenviron/gortsplib/v5 updated from v5.6.3 to v5.6.4
- github.com/bluenviron/mediacommon/v2 updated from v2.9.2 to v2.9.3
- github.com/datarhei/gosrt updated from v0.11.0 to v0.11.1-0.20260812091715-a77b40bb4b76
- github.com/pion/ice/v4 updated from v4.4.0 to v4.4.1
- github.com/pion/transport/v4 updated from v4.0.2 to v4.1.0
- github.com/stretchr/testify updated from v1.11.1 to v1.12.0
- golang.org/x/crypto updated from v0.54.0 to v0.55.0
- golang.org/x/net updated from v0.57.0 to v0.58.0
- github.com/davecgh/go-spew removed
- github.com/pion/srtp/v3 updated from v3.0.12 to v3.0.13
- github.com/pmezard/go-difflib removed
- golang.org/x/text updated from v0.40.0 to v0.41.0
- hls.js updated from v1.6.16 to v1.7.0
Security
Binaries are compiled from source code by the Release workflow, which is a fully-visible process that prevents any change or external interference in produced artifacts.
Checksums of binaries are also published in a public blockchain by using GitHub Attestations, and they can be verified by running:
ls mediamtx_* | xargs -L1 gh attestation verify --repo bluenviron/mediamtx
You can verify checksums of binaries by downloading checksums.sha256 and running:
cat checksums.sha256 | grep "$(ls mediamtx_*)" | sha256sum --check
v1.20.0
New major features
General
- support forwarding streams natively (#5558) It is now possible to define forward destinations for each path configuration. For each destination, the server will create a client that will forward the stream to the intended destination. Supported protocols are RTSP, RTMP, SRT. API and metrics have also been improved to allow monitoring the new forwarding system. Documentation: https://mediamtx.org/docs/features/forward
Media-Over-QUIC
- support publishing and reading through native QUIC (#6039)
- support draft-17 (#6040)
- support draft-16 (#6045)
Fixes and improvements
General
- docs: add missing MoQ ports (#5983)
- Add OpenAPI definition of the Playback server (#5546)
- fix support for regexp groups greater than 10 (#6033)
Media-Over-QUIC
RTSP
- fix inability to read some AV1 streams with RTSP (#6001) (#6006) Since v1.16.0, temporal unit delimiters were not stripped from AV1 streams anymore. This has been restored, healing AV1 streams read with RTSP.
- log write errors (#6023)
- make multicast errors on single interfaces non-fatal (bluenviron/gortsplib#1115) (#5574) When writing multicast packets to several interfaces at one, a write error to a single interface was fatal and prevented writing to the other ones. Fix this.
RTMP
- server: fix parsing URL from multitrack OBS (#6007) (bluenviron/gortmplib#93)
- client: change mapping between URL and tcURL, app, streamKey (bluenviron/gortmplib#94) (#4676) URLs passed to clients are now mapped into RTMP-native fields (tcURL, app, streamKey) in this way: tcURL contains URL without credentials and without fragment, app contains path and query of tcURL, streamKey contains the fragment.
- client: fix compatibility with YouTube (#5558) (bluenviron/gortmplib#95)
HLS
- muxer: fix goroutine leak during part rotation (bluenviron/gohlslib#372) (bluenviron/gohlslib#373)
- muxer: remove lower limit on AAC access unit count in MPEG-TS segments (bluenviron/gohlslib#329) (bluenviron/gohlslib#377)
- muxer: recompute PTS of MPEG-TS AAC (bluenviron/gohlslib#379) iOS requires a precise timestamp that is often not available in AAC streams. Recompute timestamp from scratch.
WebRTC
- sort tracks in a deterministic way (#5988) (#5989) When ingesting tracks with WebRTC, track order was randomized, preventing multi-track always-available streams from working reliably, since they require tracks to be ordered in a precise way. WebRTC tracks are not ordered by MID, RID, trackID and streamID respectively.
- fix packet corruption when reading G722 (#6000)
- reset recomputed audio PTS if it drifts too much (#6021)
- fix "packet lost" error when routing streams from WebRTC (#6034) Chrome sometimes sends empty packets, that are discarded by the server, but the sequence number of following packets is not recomputed, leading downstream packet loss detectors to emit errors. This is fixed.
SRT
- improve log clarity (#5990) use message 'passphrase not provided by client' when clients do not provide passphrases.
- show stream ID in logs (#6018)
- close sources immediately when path is closed (#6038)
Dependencies
- code.cloudfoundry.org/bytefmt updated from v0.82.0 to v0.83.0
- github.com/MicahParks/jwkset updated from v0.11.0 to v0.11.3
- github.com/MicahParks/keyfunc/v3 updated from v3.8.0 to v3.8.1
- github.com/bluenviron/gohlslib/v2 updated from v2.4.1 to v2.4.2
- github.com/bluenviron/gortmplib updated from v0.4.1 to v1.0.0
- github.com/bluenviron/gortsplib/v5 updated from v5.6.2 to v5.6.3
- github.com/go-git/go-billy/v5 updated from v5.9.0 to v5.9.1
- github.com/go-git/go-git/v5 updated from v5.19.1 to v5.19.2
- github.com/pion/ice/v4 updated from v4.3.0 to v4.4.0
- github.com/pion/interceptor updated from v0.1.46 to v0.1.47
- github.com/pion/webrtc/v4 updated from v4.2.17 to v4.2.18
- github.com/quic-go/quic-go updated from v0.60.0 to v0.61.0
- github.com/quic-go/webtransport-go updated from v0.11.1 to v0.12.0
- github.com/pion/sctp updated from v1.11.0 to v1.11.1
- golang.org/x/time updated from v0.14.0 to v0.15.0
Security
Binaries are compiled from source code by the Release workflow, which is a fully-visible process that prevents any change or external interference in produced artifacts.
Checksums of binaries are also published in a public blockchain by using GitHub Attestations, and they can be verified by running:
ls mediamtx_* | xargs -L1 gh attestation verify --repo bluenviron/mediamtx
You can verify checksums of binaries by downloading checksums.sha256 and running:
cat checksums.sha256 | grep "$(ls mediamtx_*)" | sha256sum --check
v1.19.3
Fixes and improvements
General
- fix error message (#5922) 'all' is a synonym for 'all_others'
- fix clearing lists with environment variables (#5410) (#5924) MTX_AUTHINTERNALUSERS_0_IPS, MTX_LOGDESTINATIONS and MTX_RTSPTRANSPORTS can now be used to clear their corresponding list by setting them to an empty value.
- add runOnOnline / runOnOffline hooks (#5399) (#5956) These are triggered and a stream is online (i.e. not just provided by an offline segment).
- rename runOnReady into runOnAvailable, runOnNotReady into runOnUnavailable (#5957)
- fix wrong PTS and wrong playback of alwaysAvailableFile (#5436) (#5960) PTS offset of samples was not properly considered, and sleep between samples was PTS-based instead of being DTS-based.
- avoid potential timing attack when validating SHA256 credentials (#5961) The == operator is vulnerable to timing attacks as it short-circuits on a mismatch. Use ConstantTimeCompare to avoid this vector. Co-authored-by: Tristan Matthews tmatth@videolan.org
- normalize authentication error messages (#5421) (#5959) Log authentication errors as soon as possible, use the "warn" level, use the same message whatever the author or protocol.
- adjust code to prevent security scan false positives (#5963) about string escaping.
- ask for credentials only in case of protocols that support it (#5966) When clients connect with some protocols (SRT, RTMP), they are unable to provide credentials even if they are asked to. In this case, it's useless to wait for credentials, and it's better to immediately log authentication errors and apply the anti-brute force algorithm.
- docs: add fail2ban integration (#5016) (#5967)
- add comment to prevent security scan false positives (#5973)
- pmp4: fix support for ctts version 0 (#5436) (bluenviron/mediacommon#343)
API
- generate most of OpenAPI automatically (#5918) enums and structs are now generated automatically. This eliminates some inconsistencies and makes development easier.
Media-Over-QUIC
- fix race condition during startup (#5965) allocate the HTTP server only after the MoQ server has been initialized.
- fix several panics and OOM errors (#5964) Check for limits before allocating memory by using sizes passed from the remote peer. Also add fuzzing to all MoQ primitives.
- support draft-19 of the specification (#5968) * support draft-19 of the specification * support subscribing the same track multiple times.
- prevent excessive CPU consumption in reorderer (#5976) do not iterate by maxGroupID (passed by user) but iterate by internal pending packets (uncontrolled by user).
WebRTC
- prevent cross-origin unauthorized access (#5975) when a user had previously inserted credentials into a MediaMTX instance through a browser, and AllowOrigins was set to a wildcard, third-party websites visited by the user were allowed to read streams without restrictions. This is now prevented by returning "*" in Access-Control-Allow-Origins when AllowOrigins is a wildcard, a behavior that prevents browsers from sharing credentials with third-party websites.
RTSP
- restrict UDP port range to 32768-60999 (#5398) (#5958) this is the default Linux ephemeral port range.
- use session ID in requests to the external authentication server (#5977) Co-authored-by: Cycle1337 Cycle1337@outlook.com
- prevent truncation of 64-bit values on 32-bit platforms (bluenviron/gortsplib#1094)
- fix parsing RTCP of some Hanwha cameras (#5355) (bluenviron/gortsplib#1099)
- use original pion/sdp.SessionDescription instead of a custom one; move unmarshaler in sdpunmarshaler (bluenviron/gortsplib#1100)
- client: fix UDP ports not being released after close (bluenviron/gortsplib#1105)
- client: return an error when UDP port range is exhausted (bluenviron/gortsplib#1104)
HLS
- prevent cross-origin unauthorized access (#5975) when a user had previously inserted credentials into a MediaMTX instance through a browser, and AllowOrigins was set to a wildcard, third-party websites visited by the user were allowed to read streams without restrictions. This is now prevented by returning "*" in Access-Control-Allow-Origins when AllowOrigins is a wildcard, a behavior that prevents browsers from sharing credentials with third-party websites.
SRT
Dependencies
- code.cloudfoundry.org/bytefmt updated from v0.78.0 to v0.82.0
- github.com/alecthomas/kong updated from v1.15.0 to v1.16.0
- github.com/bluenviron/gohlslib/v2 updated from v2.4.0 to v2.4.1
- github.com/bluenviron/gortmplib updated from v0.4.0 to v0.4.1
- github.com/bluenviron/gortsplib/v5 updated from v5.6.1 to v5.6.2
- github.com/bluenviron/mediacommon/v2 updated from v2.9.1 to v2.9.2
- github.com/matthewhartstonge/argon2 updated from v1.5.5 to v1.5.6
- github.com/pion/ice/v4 updated from v4.2.8-0.20260604162030-72f5001c4596 to v4.3.0
- github.com/pion/interceptor updated from v0.1.45 to v0.1.46
- github.com/pion/rtcp updated from v1.2.16 to v1.2.17
- github.com/pion/rtp updated from v1.10.2 to v1.10.5
- github.com/pion/webrtc/v4 updated from v4.2.15 to v4.2.17
- github.com/pires/go-proxyproto updated from v0.12.0 to v0.15.0
- github.com/quic-go/webtransport-go updated from v0.11.0 to v0.11.1
- golang.org/x/crypto updated from v0.53.0 to v0.54.0
- golang.org/x/net updated from v0.56.0 to v0.57.0
- golang.org/x/sync updated from v0.21.0 to v0.22.0
- golang.org/x/sys updated from v0.46.0 to v0.47.0
- golang.org/x/term updated from v0.44.0 to v0.45.0
- github.com/pion/datachannel updated from v1.6.0 to v1.6.2
- github.com/pion/dtls/v3 updated from v3.1.4 to v3.1.5
- github.com/pion/sctp updated from v1.10.0 to v1.11.0
- github.com/pion/stun/v3 updated from v3.1.5 to v3.1.6
- github.com/pion/turn/v5 updated from v5.0.9 to v5.0.12
- golang.org/x/text updated from v0.38.0 to v0.40.0
Security
Binaries are compiled from source code by the Release workflow, which is a fully-visible process that prevents any change or external interference in produced artifacts.
Checksums of binaries are also published in a public blockchain by using GitHub Attestations, and they can be verified by running:
ls mediamtx_* | xargs -L1 gh attestation verify --repo bluenviron/mediamtx
You can verify checksums of binaries by downloading checksums.sha256 and running:
cat checksums.sha256 | grep "$(ls mediamtx_*)" | sha256sum --check
v1.19.2
Fixes and improvements
General
- playback: fix panic when MP4 muxer flushes with no samples (#5867)
- redact sensitive headers in HTTP debug logs (#5873)
- fix(recordstore): decode timezone offset minutes correctly (#5884)
- improve HTTP server performance (#5886) log incoming requests without cloning.
- prevent truncation of 64-bit values on 32-bit platforms (#5902)
RTSP
- add rtspScale parameter to inject Scale header on PLAY (#5800)
- client: switch automatically to TCP in case of H264 packetization-mode=0 (bluenviron/gortsplib#1086)
- support VP8 streams with multiple partitions (https://github.com/bluenviron/mediamtx/issues/5426) (bluenviron/gortsplib#1090)
- allow FU-A and STAP-A packets with H264 packetization-mode 0 (#5887) (bluenviron/gortsplib#1092)
WebRTC
- skip unresolvable webrtcAdditionalHosts entries instead of aborting (#5845)
RPI Camera
- support encoding primary stream with MJPEG (2/2) (#5892)
- support encoding secondary stream with H264 (2/2) (#4485) (#5898)
- add unified rpiCameraH264Profile, rpiCameraH264Level params (#5894) These replace rpiCameraHardwareH264Profile, rpiCameraHardwareH264Level, rpiCameraSoftwareH264Profile, rpiCameraSoftwareH264Level.
- fix race condition that prevents decoding the stream (bluenviron/mediamtx-rpicamera#109) (#5861) When a player immediately connects to a newly-created stream, SPS/PPS might not be available, neither in the SDP and neither in-band. Prevent the issue by always sending SPS/PPS in-band.
- improve performance by computing frame size once (bluenviron/mediamtx-rpicamera#111)
- fix wrong timestamp being passed to openh264 (bluenviron/mediamtx-rpicamera#114)
Dependencies
- code.cloudfoundry.org/bytefmt updated from v0.76.0 to v0.78.0
- github.com/abema/go-mp4 updated from v1.6.0 to v1.7.1
- github.com/bluenviron/gortsplib/v5 updated from v5.6.0 to v5.6.1
- github.com/bluenviron/mediacommon/v2 updated from v2.9.0 to v2.9.1
- github.com/matthewhartstonge/argon2 updated from v1.5.4 to v1.5.5
- github.com/pion/sdp/v3 updated from v3.0.18 to v3.0.19
- github.com/quic-go/webtransport-go updated from v0.10.0 to v0.11.0
- github.com/pion/srtp/v3 updated from v3.0.11 to v3.0.12
- github.com/bluenviron/mediamtx-rpicamera updated from v2.6.0 to v2.8.0
Security
Binaries are compiled from source code by the Release workflow, which is a fully-visible process that prevents any change or external interference in produced artifacts.
Checksums of binaries are also published in a public blockchain by using GitHub Attestations, and they can be verified by running:
ls mediamtx_* | xargs -L1 gh attestation verify --repo bluenviron/mediamtx
You can verify checksums of binaries by downloading checksums.sha256 and running:
cat checksums.sha256 | grep "$(ls mediamtx_*)" | sha256sum --check
v1.19.1
Fixes and improvements
General
- support using regexp groups in every part of a source URL (#5766) (#5779)
- improve anti-brute force mechanism (#5835) delay authentication failure responses by a random amount of time, use the same anti-brute force mechanism with all users.
- limit size of HTTP requests shown in debug logs (#5858)
- print body of selected HTTP responses when log level is debug (#5859)
Media-over-QUIC
- fix race condition when closing server (#5836) some sessions were hanging if they were concurrently being closed by the remote peer.
- rename moqHTTPS2Address into moqHTTP2Address, moqHTTPS3Address into moqHTTP3Address (#5841)
RTSP
- support PROXY protocol (#5754) Support PROXY protocol v1/v2 on RTMP, RTMPS, RTSP, and RTSPS TCP listeners so real client IPs are visible when running behind L4 proxies (nginx stream, HAProxy, AWS NLB).
- restore support for H264 packetization-mode 0 (#5846) (#5857) H264 streams with packetization-mode=0 cannot be routed with UDP since packets are too big. Inbound streams with packetization-mode=0 are blocked by the server since v1.19.0 but this caused compatibility issues with some cameras. The server is now able to receive such streams with TCP, and automatically remuxes them in streams with packetization-mode=1, which can be routed freely.
RTMP
- support PROXY protocol (#5754) Support PROXY protocol v1/v2 on RTMP, RTMPS, RTSP, and RTSPS TCP listeners so real client IPs are visible when running behind L4 proxies (nginx stream, HAProxy, AWS NLB).
Dependencies
- code.cloudfoundry.org/bytefmt updated from v0.74.0 to v0.76.0
- github.com/bluenviron/gortsplib/v5 updated from v5.5.4 to v5.6.0
- github.com/pion/ice/v4 updated from v4.2.7 to v4.2.8-0.20260604162030-72f5001c4596
- github.com/pion/webrtc/v4 updated from v4.2.14 to v4.2.15
- github.com/quic-go/quic-go updated from v0.59.0 to v0.60.0
- golang.org/x/crypto updated from v0.52.0 to v0.53.0
- golang.org/x/net updated from v0.55.0 to v0.56.0
- golang.org/x/sync updated from v0.20.0 to v0.21.0
- golang.org/x/sys updated from v0.45.0 to v0.46.0
- golang.org/x/term updated from v0.43.0 to v0.44.0
- github.com/pion/dtls/v3 updated from v3.1.3 to v3.1.4
- github.com/pion/stun/v3 updated from v3.1.4 to v3.1.5
- github.com/pion/turn/v5 updated from v5.0.7 to v5.0.9
- golang.org/x/text updated from v0.37.0 to v0.38.0
- github.com/pires/go-proxyproto v0.12.0 added
Security
Binaries are compiled from source code by the Release workflow, which is a fully-visible process that prevents any change or external interference in produced artifacts.
Checksums of binaries are also published in a public blockchain by using GitHub Attestations, and they can be verified by running:
ls mediamtx_* | xargs -L1 gh attestation verify --repo bluenviron/mediamtx
You can verify checksums of binaries by downloading checksums.sha256 and running:
cat checksums.sha256 | grep "$(ls mediamtx_*)" | sha256sum --check
v1.19.0
New major features
Media-over-QUIC
- support reading and publishing with Media-over-QUIC (#5815) Media-over-QUIC is a streaming protocol built upon cutting edge protocols (QUIC, HTTP3) and browser APIs (WebTransport, WebCodecs). It's slightly faster than WebRTC, has an advanced data recovery mechanism, it supports additional codecs (FLAC) and is less complicated to route. Check the documentation for instructions and details.
RTMP
HLS
Fixes and improvements
General
- Add user agent field to RTMP, RTSP, WebRTC, and HLS (#5753)
- add --check-version command line flag (#5786) this allows to check whether a new version is available without upgrading.
- use file name suffix for OS-specific code wherever possible (#5787)
- fix two hot reloading cases (#5817) * reload SRT server when metrics server is reloaded * reload API server when RTMPS server is reloaded
RTSP
- client: trigger TCP timeout only if nothing is received (bluenviron/gortsplib#1002) (bluenviron/gortsplib#968) (bluenviron/gortsplib#1067) Previously, a data packet was required, now a keepalive response from the server is enough.
- sdp: support non-standard 'meta' media type (bluenviron/gortsplib#1068)
- forbid H264 packetization mode zero (bluenviron/gortsplib#1072) Packetization mode zero requires allowing inefficient and brittle fragmented UDP packets, which we are not.
RTMP
- client: add FLAC fourCC (bluenviron/gortmplib#73)
- do not exit in case of undocumented Flash control messages (#5512) (bluenviron/gortmplib#75)
HLS
- remove redundant JavaScript argument (#5806)
- muxer: fix race condition when generating playlist (bluenviron/gohlslib#359) (bluenviron/gohlslib#360) Max age of playlist depends on segments, so it needs to be covered by the segment mutex.
- muxer: use coherent version in all playlists (#5781) (bluenviron/gohlslib#363)
WebRTC
- make JavaScript internal variables private (#5804)
- fix connectivity after network changes (#5097) (#5818)
RPI Camera
- use timestamp of frame in text overlay (#2733) (bluenviron/mediamtx-rpicamera#103)
Dependencies
- code.cloudfoundry.org/bytefmt updated from v0.72.0 to v0.74.0
- github.com/abema/go-mp4 updated from v1.5.0 to v1.6.0
- github.com/bluenviron/gohlslib/v2 updated from v2.3.2 to v2.4.0
- github.com/bluenviron/gortmplib updated from v0.3.2 to v0.4.0
- github.com/bluenviron/gortsplib/v5 updated from v5.5.3 to v5.5.4
- github.com/bluenviron/mediacommon/v2 updated from v2.8.3 to v2.9.0
- github.com/go-git/go-git/v5 updated from v5.19.0 to v5.19.1
- github.com/matthewhartstonge/argon2 updated from v1.5.3 to v1.5.4
- github.com/pion/ice/v4 updated from v4.2.5 to v4.2.7
- github.com/pion/transport/v4 updated from v4.0.1 to v4.0.2
- github.com/pion/webrtc/v4 updated from v4.2.12 to v4.2.14
- golang.org/x/crypto updated from v0.51.0 to v0.52.0
- golang.org/x/net updated from v0.54.0 to v0.55.0
- golang.org/x/sys updated from v0.44.0 to v0.45.0
- github.com/pion/dtls/v3 updated from v3.1.2 to v3.1.3
- github.com/pion/sctp updated from v1.9.5 to v1.10.0
- github.com/pion/srtp/v3 updated from v3.0.10 to v3.0.11
- github.com/pion/stun/v3 updated from v3.1.2 to v3.1.4
- github.com/pion/turn/v5 updated from v5.0.3 to v5.0.7
- github.com/quic-go/webtransport-go v0.10.0 added
- golang.org/x/sync v0.20.0 added
- github.com/dunglas/httpsfv v1.1.0 added
- github.com/bluenviron/mediamtx-rpicamera updated from v2.5.7 to v2.6.0
Security
Binaries are compiled from source code by the Release workflow, which is a fully-visible process that prevents any change or external interference in produced artifacts.
Checksums of binaries are also published in a public blockchain by using GitHub Attestations, and they can be verified by running:
ls mediamtx_* | xargs -L1 gh attestation verify --repo bluenviron/mediamtx
You can verify checksums of binaries by downloading checksums.sha256 and running:
cat checksums.sha256 | grep "$(ls mediamtx_*)" | sha256sum --check