Alessandro Ros
9e82b5233d
fix 1-minute offset when recording a H264 WebRTC track ( #5275 ) ( #5278 )
code_lint / go (push) Waiting to run
code_lint / go_mod (push) Waiting to run
code_lint / docs (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
2025-12-19 13:32:14 +01:00
Alessandro Ros
834b079b78
rtsp: fix crash when setupping tracks between stream changes ( #5253 ) ( #5257 )
code_lint / go (push) Waiting to run
code_lint / go_mod (push) Waiting to run
code_lint / docs (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
2025-12-07 11:38:52 +01:00
dependabot[bot]
66c7519e12
build(deps): bump github.com/bluenviron/gortmplib from 0.1.1 to 0.1.2 ( #5254 )
...
Bumps [github.com/bluenviron/gortmplib](https://github.com/bluenviron/gortmplib ) from 0.1.1 to 0.1.2.
- [Commits](https://github.com/bluenviron/gortmplib/compare/v0.1.1...v0.1.2 )
---
updated-dependencies:
- dependency-name: github.com/bluenviron/gortmplib
dependency-version: 0.1.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 10:56:32 +01:00
Alessandro Ros
3de05c1330
api: always reply with JSON in case of success or failure ( #5252 )
...
Reply with "status": "ok" in case of success, and with "status":
"error" in case of error. This makes the API more accessible and user
friendly.
2025-12-07 10:37:55 +01:00
Alessandro Ros
a0a75dfab6
fix panic when changing log file to a nonexisting directory ( #5132 ) ( #5249 )
2025-12-06 22:51:25 +01:00
Alessandro Ros
8d3c4074d8
api: split implementation into multiple files ( #5251 )
2025-12-06 22:50:06 +01:00
Alessandro Ros
0139105583
playback: fix crash ( #5240 ) ( #5250 )
...
when requesting a recording with the mp4 format, if there are two
tracks and the second track has no sample, the server crashed. This
fixes the issue.
2025-12-06 22:45:50 +01:00
Alessandro Ros
fb9027a334
recorder: reset when absolute time drifts from stream time ( #4778 ) ( #5239 )
...
the server now detects when system time changes too much and restarts
recordings when that happens.
2025-12-02 18:10:23 +01:00
Alessandro Ros
9c5930464f
playback: support concatenating segments with long gaps ( #5172 )
...
code_lint / go (push) Waiting to run
code_lint / go_mod (push) Waiting to run
code_lint / docs (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
Thanks to the new mtxi MP4 box, it's possible to check whether two
segments are consecutive without involving dates or timestamps.
When the new mtxi box is present in both segments, do not check if
the end of the first segment corresponds to the start of the
second segment.
2025-12-01 21:27:08 +01:00
boenshao
b4e4f54729
test: fix and assert that all tracks are recorded ( #5166 )
...
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2025-11-23 00:41:55 +01:00
Omar Ferro
e168d2f3f4
apidocs: fix compatibility with OpenAPI 3.0 ( #5210 )
...
double-precision numbers are now represented as double.
2025-11-22 23:05:08 +01:00
bluenviron-bot
0c773c5875
bump hls.js to v1.6.15 ( #5216 )
2025-11-21 02:08:53 +01:00
KHuynh
ade0cddeb3
support multiple CORS origins ( #5150 )
...
Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2025-11-21 02:00:46 +01:00
dependabot[bot]
4b80f5fbf5
build(deps): bump github.com/pion/rtp from 1.8.23 to 1.8.25 ( #5138 )
...
Bumps [github.com/pion/rtp](https://github.com/pion/rtp ) from 1.8.23 to 1.8.25.
- [Release notes](https://github.com/pion/rtp/releases )
- [Changelog](https://github.com/pion/rtp/blob/master/.goreleaser.yml )
- [Commits](https://github.com/pion/rtp/compare/v1.8.23...v1.8.25 )
---
updated-dependencies:
- dependency-name: github.com/pion/rtp
dependency-version: 1.8.25
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-18 04:12:41 +01:00
Alessandro Ros
3f599d236f
rtp: reorder packets before ingestion ( #5194 )
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
2025-11-14 17:19:48 +01:00
Alessandro Ros
2d02ca0df7
webrtc: use rtpReceiver and rtpSender to count packets ( #5193 )
2025-11-14 17:10:50 +01:00
Alessandro Ros
d02fb4ed8e
move constant ( #5190 )
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
2025-11-12 18:09:53 +01:00
Alessandro Ros
ff187b6d8a
update golangci-lint configuration ( #5182 )
2025-11-11 23:57:52 +01:00
Alessandro Ros
ac1d4360b2
tests: fix race condition ( #5187 )
2025-11-11 21:12:01 +01:00
Alessandro Ros
8858bf1db9
simplify code with ptrOf ( #5179 )
2025-11-11 12:01:03 +01:00
Alessandro Ros
5be9b0eb97
rename variable ( #5173 )
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
2025-11-09 22:19:17 +01:00
bluenviron-bot
2cd62af900
bump hls.js to v1.6.14 ( #5147 )
2025-11-02 16:58:58 +01:00
Alessandro Ros
1ef5db5b3c
extend udpReadBufferSize to WebRTC UDP sockets ( #5130 )
...
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
this allows to decrease packet losses without touching system parameters.
2025-10-29 11:45:15 +01:00
Alessandro Ros
adc4a6ceb6
add udpReadBufferSize parameter ( #5129 )
...
this allows to set a global UDP read buffer, applied to every UDP socket.
2025-10-29 11:28:22 +01:00
Alessandro Ros
c42642ac3c
recorder: prevent FMP4 durations from overflowing ( #4711 ) ( #5126 )
...
code_lint / go (push) Waiting to run
code_lint / go_mod (push) Waiting to run
code_lint / docs (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
The timestamp difference between two samples was put inside an unsigned
integer, and, when negative, caused an overflow.
2025-10-26 15:52:13 +01:00
bluenviron-bot
4ff80d773b
bump mediamtx-rpicamera to v2.5.1 ( #5121 )
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
2025-10-21 21:50:28 +02:00
Alessandro Ros
d209454693
rtmp: fix freeze when reading source ( #5117 )
...
Tracks were read without deadlines, freezing the server if they are not
present. This patch also allows to close the server immediately during
track reading.
2025-10-21 18:04:18 +02:00
Alessandro Ros
f126a7e7d6
playback: improve segment merging algorithm ( #5084 )
...
* merge segments only if they belong to the same stream and are
consecutive. * compute DTS without using NTP timestamp, increasing
robustness against NTP fluctuations.
2025-10-13 17:00:21 +02:00
Alessandro Ros
7bca38badb
add self-upgrader ( #3501 ) ( #5035 )
...
this allows to upgrade MediaMTX to latest version by running
./mediamtx --upgrade
2025-10-13 13:06:47 +02:00
Alessandro Ros
02e2b9d640
recorder: write additional infos inside segments ( #5083 )
...
write stream ID, segment number, DTS, NTP in a dedicated box. This
allows to improve the merge algorithm in the playback server.
2025-10-13 12:34:44 +02:00
Alessandro Ros
ccaccc51b4
replace incoming absolute timestamps of any source ( #5081 )
...
Absolute timestamps are used to generate recording segments, so users
should not be able to change them, unless explicitly allowed.
Parameter useAbsoluteTimestamp allowed to re-enable absolute timestamps
with RTSP and WebRTC, now it is extended to all protocols.
2025-10-13 12:23:51 +02:00
Alessandro Ros
75420552b9
recorder: reset fMP4 sequence number during segment switch ( #5082 )
...
code_lint / go (push) Waiting to run
code_lint / go_mod (push) Waiting to run
code_lint / docs (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
It's useless to make sequence numbers unique across the entire stream.
2025-10-12 17:59:28 +02:00
Alessandro Ros
a9d84103d0
prevent estimated absolute timestamp from drifting too much ( #5080 )
2025-10-12 17:53:22 +02:00
Alessandro Ros
0cdae40fe3
estimate absolute timestamp more precisely ( #5078 )
...
When the absolute timestamp of incoming frames was not available, it
was filled with the current timestamp, which is influenced by latency
over time.
This mechanism is replaced by an algorithm that detects when latency is
the lowest, stores the current timestamp and uses it as reference
throughout the rest of the stream.
2025-10-12 11:02:14 +02:00
Alessandro Ros
f5f03562d3
rewrite Unit definition ( #5079 )
...
code_lint / go (push) Waiting to run
code_lint / go_mod (push) Waiting to run
code_lint / docs (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
Stream units now share the same struct, with a specialized payload.
2025-10-11 12:18:51 +02:00
Alessandro Ros
6415285427
hls: improve web page performance ( #5062 )
...
load hls.js in parallel with the page.
2025-10-05 18:00:14 +02:00
Alessandro Ros
7634370818
add read and write timeouts in HTTP servers ( #5056 )
...
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
this prevents zombie connections from piling up.
2025-10-04 10:01:21 +02:00
Alessandro Ros
691d7290fb
webrtc: fix packet corruption when reading G711 ( #5048 )
...
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
when a reader is reading a G711 track, stream units are modified
globally, affecting every other reader. This fixes the issue.
2025-09-30 10:42:24 +02:00
Alessandro Ros
2690ef8e71
api: add /info endpoint ( #945 ) ( #5045 )
2025-09-30 10:39:27 +02:00
Alessandro Ros
2024783eec
webrtc: fix clippy audio when reading Opus ( #3878 ) ( #5047 )
...
Opus timestamp is now recomputed from scratch.
2025-09-30 10:35:56 +02:00
Alessandro Ros
cd80814009
do not include recorder and HLS muxer in sent bytes ( #4380 ) ( #5039 )
...
code_lint / go (push) Waiting to run
code_lint / go_mod (push) Waiting to run
code_lint / docs (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
in API (/paths/list, /paths/get) and metrics (paths_bytes_sent), the
amount of sent bytes was increased even in case of writes to the
recorder and HLS muxer, which are not generating network traffic. This
fixes the issue.
2025-09-29 09:28:04 +02:00
Alessandro Ros
ada39d22cd
on Windows, do not look for configuration in linux paths ( #5036 )
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
2025-09-27 13:36:04 +02:00
Alessandro Ros
d6e6954a12
api: fix crash in rtspsessions/list and /rtspsessions/get ( #5030 ) ( #5031 )
...
sometimes sessions have an empty associated path, and this caused a
crash.
2025-09-25 10:57:03 +02:00
Alessandro Ros
6b57c5187b
webrtc: add authentication parameters to publisher.js and reader.js ( #5026 )
...
code_lint / go (push) Waiting to run
code_lint / go_mod (push) Waiting to run
code_lint / docs (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
add user, pass and token configuration parameters.
2025-09-24 18:28:53 +02:00
Alessandro Ros
e1f5d06612
allow changing record parameters without disconnecting readers ( #4663 ) ( #5018 )
2025-09-23 10:31:05 +02:00
Alessandro Ros
f987695d9d
rtsp: log authentication failure reason ( #4641 ) ( #5017 )
2025-09-23 10:18:13 +02:00
Alessandro Ros
5240bcb8ff
log authentication errors of API, metrics, pprof ( #4641 ) ( #5015 )
2025-09-23 09:51:22 +02:00
bluenviron-bot
b192dbc492
bump hls.js to v1.6.13 ( #5024 )
2025-09-23 09:36:32 +02:00
Alessandro Ros
85f57b90db
stop accepting JWTs from query parameters unless allowed in conf ( #5010 )
...
This is the first step into removing support for JWTs in
query parameters, which is a security flaw.
2025-09-22 10:04:51 +02:00
Alessandro Ros
68b4c20627
fix reading JWT when it is passed through the password field ( #5009 )
...
Usernames and passwords must be requested explicitly to clients, but
they were not requested when JWT is meant to be passed as password.
This fixes the issue.
2025-09-22 10:00:33 +02:00