100 Commits
Author SHA1 Message Date
Alessandro RosandGitHub 2328e51a21 test: fix race condition (#6144) 2026-08-27 13:48:22 +00:00
Alessandro RosandGitHub 04a133290b test: convert more tests to black-box style (#6139) 2026-08-27 10:15:31 +00:00
Alessandro RosandGitHub f651e951fb bump Docker RPI images to Debian Trixie (#6143) 2026-08-27 10:15:21 +00:00
Alessandro RosandGitHub 3fef488eea drop support for Debian Bullseye (#6137)
Bullseye reached EOL on 31st august 2026.
2026-08-27 09:50:42 +02:00
Alessandro RosandGitHub 3f2b3cd3f5 support setting read buffer size on macOS (#6128) (#6131) 2026-08-25 06:19:31 +00:00
Alessandro RosandGitHub 6c1463bbd8 docs: add YouTube and Twitch instructions (#6133) 2026-08-23 10:36:25 +02:00
Alessandro RosandGitHub 9934156a0f use internal/core/VERSION as single source of truth to get version (#6119) 2026-08-19 20:40:50 +02:00
Alessandro RosandGitHub 883194a19b bump dependencies (#6113) 2026-08-18 11:53:43 +00:00
Alessandro RosandGitHub 8ac6ba64c8 moq: support pulling streams from other servers (#6111) 2026-08-18 13:23:40 +02:00
Alessandro RosandGitHub 31a054b79d moq: 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.
2026-08-18 12:49:38 +02:00
Alessandro RosandGitHub 89e3060db0 api: redact password in responses (#6110)
passwords are not exposed anymore through the API. They can only be
set, not read.
2026-08-18 12:16:57 +02:00
Alessandro RosandGitHub f5bbf2bd8e docs: prevent gaps in numbering (#6109) 2026-08-18 09:33:32 +00:00
Alessandro RosandGitHub 5fb93cceaf prevent again security warning about 'Zip Slip' in RPI camera downloader (#6108) 2026-08-18 07:49:58 +00:00
Alessandro RosandGitHub 5d877b4512 moq: 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.
2026-08-18 07:43:51 +00:00
Alessandro RosandGitHub b80737c122 add destFingerprint parameter (#6106)
this allows to validate self-signed certificates of forward
destinations.
2026-08-18 09:35:37 +02:00
Alessandro RosandGitHub cca0f5a0cb change default value of authHTTPExclude (#6103)
by default, do not exclude any action from HTTP authentication. Old
value triggered several security warnings.
2026-08-17 18:30:48 +02:00
Alessandro RosandGitHub a56c635f8e 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.
2026-08-17 11:14:01 +00:00
Alessandro RosandGitHub 8657b48a03 srt: restore ability to run tests on most systems (#6102) 2026-08-17 12:26:44 +02:00
Alessandro RosandGitHub 831ed9564b webrtc: support forwarding streams (#6099) 2026-08-16 21:09:59 +02:00
Alessandro RosandGitHub c9f003f247 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.
2026-08-16 16:03:37 +02:00
Alessandro RosandGitHub f89b0feb28 prevent security warning about "Zip Slip" in RPI camera downloader (#6097) 2026-08-16 11:51:15 +00:00
Alessandro RosandGitHub 8a327110ee prevent security warning about "Zip Slip" in RPI camera downloader (#6096) 2026-08-16 11:17:03 +00:00
Alessandro RosandGitHub 550bb297dc 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.
2026-08-16 11:05:50 +00:00
Alessandro RosandGitHub 309257925e document payload requirements (#6094) 2026-08-16 10:22:31 +00:00
Alessandro RosandGitHub 53acffacb4 hls: 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.
2026-08-16 10:20:51 +00:00
Alessandro RosandGitHub ee2ff01704 hls: 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.
2026-08-16 10:11:33 +00:00
Alessandro RosandGitHub 4f78c3f2d6 docs: suggest using playsinline in video tags (#6091) 2026-08-16 10:03:16 +00:00
Alessandro RosandGitHub ef6a74455b 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.
2026-08-16 11:57:13 +02:00
Alessandro RosandGitHub 337acacd60 moq: limit maximum amount of published tracks (#6087)
this prevents clients from consuming an excessive amount of memory.
2026-08-15 21:10:53 +00:00
Alessandro RosandGitHub 679b2b9532 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.
2026-08-15 17:08:49 +00:00
Alessandro RosandGitHub f29816fe50 moq: do not accept empty payloads (#6085) 2026-08-15 16:56:35 +00:00
Alessandro RosandGitHub 02e060721d remove useless JPEG checks from recorder (#6083)
MJPEG frames are already validated before reaching the recorder,
there's no need to validate them twice.
2026-08-15 17:38:01 +02:00
Alessandro RosandGitHub 78081d71d5 rpi: 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.
2026-08-15 16:27:41 +02:00
Alessandro RosandGitHub 145381e81d 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.
2026-08-13 09:05:39 +00:00
Alessandro RosandGitHub b86f02c227 restore datarhei/gosrt (#6068) 2026-08-12 10:10:23 +00:00
Alessandro RosandGitHub a146e55978 webrtc: 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.
2026-08-10 12:00:23 +00:00
Alessandro RosandGitHub 8e46f37ba7 rpi: fix crash when secondary stream is enabled (#6060) (#6061) 2026-08-08 19:41:26 +02:00
Alessandro RosandGitHub b615b7312c prevent spamming of 'stream is closed' error during shutdown (#6062) 2026-08-08 19:41:06 +02:00
Alessandro RosandGitHub 6f0faa49d1 webrtc: fix warning when IPv6 is disabled (#5733) (#6048) 2026-08-07 10:05:05 +02:00
Alessandro RosandGitHub 1b943637a4 moq: support draft-16 (#6045) 2026-08-05 12:16:07 +02:00
Alessandro RosandGitHub f0d2f11525 moq: link primitives to draft-17 sections (#6044) 2026-08-05 09:33:39 +00:00
Alessandro RosandGitHub c48b0b8fee moq: increase max namespace field count to 32 (#6043) 2026-08-05 09:20:59 +00:00
Alessandro RosandGitHub 241892220b bump dependencies (#6042) 2026-08-05 10:59:53 +02:00
Alessandro RosandGitHub a4ad182e4e format imports (#6041) 2026-08-04 22:13:15 +00:00
Alessandro RosandGitHub a65bdc1c5a moq: support draft-17 (#6040) 2026-08-04 23:57:27 +02:00
Alessandro RosandGitHub e0ed9885fc moq: support publishing and reading through native QUIC (#6039) 2026-08-04 23:47:59 +02:00
Alessandro RosandGitHub dcd4b38838 srt: close sources immediately when path is closed (#6038) 2026-08-04 22:48:57 +02:00
Alessandro RosandGitHub f36c41d90a webrtc: 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.
2026-08-04 21:00:11 +02:00
Alessandro RosandGitHub 543dbc9eb8 fix support for regexp groups greater than 10 (#6033) 2026-08-04 18:50:38 +00:00
Alessandro RosandGitHub d8b2e4b6fc add more black-box tests (#6032) 2026-08-04 18:44:17 +00:00
Alessandro RosandGitHub 021f84428d bump Ubuntu in E2E tests (#6035) 2026-08-04 18:38:27 +00:00
Alessandro RosandGitHub 9d8f894c46 srt: show stream ID in logs (#6018) 2026-08-04 17:57:01 +02:00
Alessandro RosandGitHub c8d0e47488 fix some CodeQL warnings (#6029) 2026-08-03 17:23:08 +00:00
Alessandro RosandGitHub 1c7bc95cdd prevent some CodeQL warnings (#6027) 2026-08-03 16:47:25 +00:00
Alessandro RosandGitHub 62c119f0a4 hls: prevent some CodeQL warnings (#6024) 2026-08-03 16:23:08 +00:00
Alessandro RosandGitHub 3d5039607c metrics: fix race condition in tests (#6026) 2026-08-03 18:14:20 +02:00
Alessandro RosandGitHub 35990a38c3 webrtc: fix race condition in tests (#6025) 2026-08-03 18:11:24 +02:00
Alessandro RosandGitHub 168c5900b1 docs: update (#6022) 2026-08-03 11:43:33 +00:00
Alessandro RosandGitHub 3c77704ccf rtsp: log write errors (#6023) 2026-08-02 16:48:13 +00:00
Alessandro RosandGitHub 4bb896afe0 webrtc: reset recomputed audio PTS if it drifts too much (#6021) 2026-08-01 16:24:53 +00:00
Alessandro RosandGitHub 24dd8f44a5 sync golangci-lint settings (#6020) 2026-08-01 08:30:58 +00:00
Alessandro RosandGitHub ef93aee083 use black-box testing where possible (#6016) 2026-08-01 08:06:27 +00:00
Alessandro RosandGitHub 817c22cc6c 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.
2026-07-29 14:36:23 +02:00
Alessandro RosandGitHub a0482f937f 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.
2026-07-25 19:44:45 +02:00
Alessandro RosandGitHub fc47d9e6ed srt: improve log clarity (#5990)
use message 'passphrase not provided by client' when clients do not
provide passphrases.
2026-07-25 19:44:31 +02:00
Alessandro RosandGitHub 83e04d8255 improve documentation (#5985) 2026-07-24 15:43:06 +02:00
Alessandro RosandGitHub 519a04e490 docs: add missing MoQ ports (#5983) 2026-07-24 09:12:48 +02:00
Alessandro RosandGitHub 4c5f558006 hls, 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.
2026-07-23 23:06:15 +02:00
c23bdf2924 rtsp: use session ID in requests to the external authentication server (#5977)
Co-authored-by: Cycle1337 <Cycle1337@outlook.com>
2026-07-23 23:04:29 +02:00
Alessandro RosandGitHub 5d0ba43667 moq: prevent excessive CPU consumption in reorderer (#5976)
do not iterate by maxGroupID (passed by user) but iterate by internal
pending packets (uncontrolled by user).
2026-07-23 23:01:05 +02:00
Alessandro RosandGitHub 2183d37d32 add comment to prevent security scan false positives (#5973) 2026-07-23 22:59:23 +02:00
Alessandro RosandGitHub 6da35dc389 moq: support draft-19 of the specification (#5968)
* support draft-19 of the specification

* support subscribing the same track multiple times
2026-07-21 00:24:03 +02:00
Alessandro RosandGitHub be610a6a04 docs: add fail2ban integration (#5016) (#5967) 2026-07-19 17:03:57 +02:00
Alessandro RosandGitHub 58c6099e50 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.
2026-07-19 16:52:14 +02:00
Alessandro RosandGitHub 363ac206f7 moq: 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.
2026-07-19 12:13:45 +02:00
Alessandro RosandGitHub 83cc54418c moq: fix race condition during startup (#5965)
allocate the HTTP server only after the MoQ server has been initialized.
2026-07-19 11:29:04 +02:00
Alessandro RosandGitHub 0e6426c648 adjust code to prevent security scan false positives (#5963)
... about string escaping.
2026-07-19 10:20:37 +02:00
Alessandro RosandGitHub e14ada6f4b 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.
2026-07-19 10:04:17 +02:00
d15c14ec6a 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>
2026-07-19 09:46:34 +02:00
Alessandro RosandGitHub 0378876293 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.
2026-07-18 22:39:28 +02:00
Alessandro RosandGitHub fa7a89f840 rtsp: restrict UDP port range to 32768-60999 (#5398) (#5958)
this is the default Linux ephemeral port range.
2026-07-18 20:59:33 +02:00
Alessandro RosandGitHub d6e765976c srt: fix compatibility with StreamToStudio app (#5414) (#5928) 2026-07-18 17:59:05 +02:00
Alessandro RosandGitHub 96aeb1e603 rename runOnReady into runOnAvailable, runOnNotReady into runOnUnavailable (#5957) 2026-07-18 17:58:16 +02:00
Alessandro RosandGitHub 8909e35a17 add runOnOnline / runOnOffline hooks (#5399) (#5956)
These are triggered and a stream is online (i.e. not just provided by
an offline segment).
2026-07-18 17:41:38 +02:00
Alessandro RosandGitHub 75bf1af38c 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.
2026-07-18 10:56:46 +02:00
Alessandro RosandGitHub e98b727277 fix error message (#5922)
'all' is a synonym for 'all_others'
2026-07-05 11:00:09 +02:00
Alessandro RosandGitHub 99f804d733 api: generate most of OpenAPI automatically (#5918)
enums and structs are now generated automatically. This eliminates some
inconsistencies and makes development easier.
2026-07-04 17:45:43 +02:00
Alessandro RosandGitHub f4decfd41b docs: fix MoQ read URL (#5904) 2026-06-28 16:29:24 +02:00
Alessandro RosandGitHub ce00edb92f docs: change suggested hls.js CDN (#5903) 2026-06-28 16:29:12 +02:00
Alessandro RosandGitHub 7eb5d30075 prevent truncation of 64-bit values on 32-bit platforms (#5902) 2026-06-28 11:37:14 +02:00
Alessandro RosandGitHub bf098c7eb5 support encoding secondary stream with H264 (2/2) (#4485) (#5898) 2026-06-28 11:19:23 +02:00
Alessandro RosandGitHub 1a7c10af1e rpicamera: support encoding primary stream with MJPEG (2/2) (#5892) 2026-06-27 19:19:36 +02:00
Alessandro RosandGitHub 07d0e232b2 rpi: add unified rpiCameraH264Profile, rpiCameraH264Level params (#5894)
These replace rpiCameraHardwareH264Profile, rpiCameraHardwareH264Level, rpiCameraSoftwareH264Profile, rpiCameraSoftwareH264Level.
2026-06-25 22:07:36 +02:00
Alessandro RosandGitHub b91affa054 rpi: exclude additional code from non-arm builds (#5893) 2026-06-25 19:37:28 +02:00
Alessandro RosandGitHub 90b8d5c943 improve HTTP server performance (#5886)
log incoming requests without cloning.
2026-06-20 12:03:35 +02:00
Alessandro RosandGitHub 28d648da37 move Content-Types to log in a map (#5875) 2026-06-20 09:35:55 +02:00
Alessandro RosandGitHub 0996186cdf restore quic-go/webtransport-go (#5876) 2026-06-16 15:09:00 +02:00
Alessandro RosandGitHub 874b47d0b0 remove redundant copy operation (#5862)
Since #5856, OrigDesc of Streams is never changed, so there's no reason
to clone offlineDesc before putting it into OrigDesc.
2026-06-13 11:45:44 +02:00
Alessandro RosandGitHub d0cf294637 print body of selected HTTP responses when log level is debug (#5859) 2026-06-11 00:53:52 +02:00
Alessandro RosandGitHub 959f58cee9 limit size of HTTP requests shown in debug logs (#5858) 2026-06-11 00:31:10 +02:00