Commit Graph
78 Commits
Author SHA1 Message Date
Alessandro RosandGitHub f453b59cd6 improve listener labels (#5635)
add a label after every "listener opened on :XXX" message that mentions
protocols of every listener.
2026-04-03 16:35:31 +02:00
Alessandro RosandGitHub 7418e51031 prevent directory traversal attacks (#5602)
Path names are used as part of paths in several components: in the
recorder, in the playback server and in every HTTP-based component
(WebRTC, HLS, API). Special characters that allow to escape from the
intended directory are now forbidden in order to prevent directory
traversal attacks.
2026-03-23 20:16:12 +01:00
Alessandro RosandGitHub 3bad7045c1 api: add missing enums and move all enums in dedicated components (#5576) 2026-03-15 22:09:00 +01:00
Alessandro RosandGitHub d1fd3df27c api: add user field to RTSP, RTMP, SRT, WebRTC conns and sessions (#5104) (#5565) 2026-03-14 00:03:58 +01:00
Alessandro RosandGitHub a6856e9e58 tests: fix race conditions (#5571) 2026-03-13 22:32:06 +01:00
Alessandro RosandGitHub 35e1f486c9 add integrated packet dumper (#5488)
this allows to dump any incoming and outgoing packet, to disk, in
pcapng format.
2026-02-22 13:34:05 +01:00
Alessandro RosandGitHub c250e34075 support X-Forwarded-Proto in playback server (#4970) (#5445)
allow reverse proxies to change the schema of URLs returned by the
server through the X-Forwarded-Proto header.
2026-02-11 21:47:02 +01:00
Alessandro RosandGitHub a56408db19 add always available streams (#5335)
When the publisher or source of a stream is offline, the server can be
configured to fill gaps in the stream with a video that is played on
repeat until a publisher comes back online. This allows readers to stay
connected regardless of the state of the stream. The offline video and
any future online stream are concatenated without decoding or
re-encoding packets, using the original codec.
2026-01-31 14:44:58 +01:00
bluenviron-botandGitHub 320bd3f4ae bump golangci-lint to 2.8.0 (#5350) 2026-01-15 22:43:32 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f843df4ab8 build(deps): bump github.com/bluenviron/mediacommon/v2 (#5297)
Bumps [github.com/bluenviron/mediacommon/v2](https://github.com/bluenviron/mediacommon) from 2.5.3 to 2.6.0.
- [Commits](https://github.com/bluenviron/mediacommon/compare/v2.5.3...v2.6.0)

---
updated-dependencies:
- dependency-name: github.com/bluenviron/mediacommon/v2
  dependency-version: 2.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-28 15:44:36 +01:00
Alessandro RosandGitHub 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 RosandGitHub 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 RosandGitHub 9c5930464f playback: support concatenating segments with long gaps (#5172)
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
ade0cddeb3 support multiple CORS origins (#5150)
Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2025-11-21 02:00:46 +01:00
Alessandro RosandGitHub ff187b6d8a update golangci-lint configuration (#5182) 2025-11-11 23:57:52 +01:00
Alessandro RosandGitHub 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 RosandGitHub 7634370818 add read and write timeouts in HTTP servers (#5056)
this prevents zombie connections from piling up.
2025-10-04 10:01:21 +02:00
Alessandro RosandGitHub 2690ef8e71 api: add /info endpoint (#945) (#5045) 2025-09-30 10:39:27 +02:00
Alessandro RosandGitHub f987695d9d rtsp: log authentication failure reason (#4641) (#5017) 2025-09-23 10:18:13 +02:00
Alessandro RosandGitHub 5240bcb8ff log authentication errors of API, metrics, pprof (#4641) (#5015) 2025-09-23 09:51:22 +02:00
Alessandro RosandGitHub b517631b8f fix authentication failure reason not being displayed (#5007) 2025-09-22 09:48:51 +02:00
Alessandro RosandGitHub 0c801564fd playback: fix crash during authentication errors (#4960) (#4966) 2025-09-12 15:24:51 +02:00
6ffa07e8e8 Add support for HTTP over unix sockets (#4241)
This adds support for using unix scheme in xxxAddress config options.
For example `hlsAddress: "unix://hls.sock"`.

---------

Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2025-08-03 12:30:26 +02:00
Alessandro RosandGitHub d423a71aaa update linter settings (#4790) 2025-07-26 16:44:32 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
d0a97e47ff build(deps): bump github.com/bluenviron/gohlslib/v2 from 2.2.1 to 2.2.2 (#4763)
Bumps [github.com/bluenviron/gohlslib/v2](https://github.com/bluenviron/gohlslib) from 2.2.1 to 2.2.2.
- [Commits](https://github.com/bluenviron/gohlslib/compare/v2.2.1...v2.2.2)

---
updated-dependencies:
- dependency-name: github.com/bluenviron/gohlslib/v2
  dependency-version: 2.2.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-07-21 09:55:10 +02:00
Alessandro RosandGitHub 402b8ff9c9 recorder, playback: support changing codec parameters without switching segment (#4262) (#4582) 2025-05-29 20:37:12 +02:00
Tarık ErkanandGitHub e6a7a87c7f Fix: gracefully handle fMP4 segments with missing or partial moof/mdat (#4538) 2025-05-25 21:29:53 +02:00
Alessandro RosandGitHub fff3b9b315 record: fix loss of audio samples during segment switch (#4556) 2025-05-25 21:29:33 +02:00
Alessandro RosandGitHub 01e6fedc36 playback: fix jerky video (#4555)
this happened when recording has B-frames, playback format is fmp4 and starting position doesn't correspond to a IDR frame.
2025-05-25 21:09:23 +02:00
Alessandro RosandGitHub 9a3bbda8f8 playback: fix error 404 when seeking before start of segment (#4276) (#4533) (#4539)
Fixes #4276
Replaces #4533
2025-05-25 18:50:19 +02:00
Alessandro RosandGitHub e707a9237d improve tests, documentation (#4549) 2025-05-23 13:25:17 +02:00
Alessandro RosandGitHub f97213ae6e support passing JWTs through the password field (#4516)
This is safer than passing JWTs through query parameters, unfortunately support is limited.
2025-05-10 22:54:24 +02:00
Alessandro RosandGitHub 386be42784 rtsp: rewrite authentication around ServerConn.VerifyCredentials (#4267) 2025-02-18 17:54:13 +01:00
Alessandro RosandGitHub 244da930a1 switch to mediacommon/v2 (#4259) 2025-02-17 14:54:58 +01:00
35e858c6e7 playback: fix filtering when start date is earlier than first segment (#4173)
* bugfix in recordstore: no segments returned when given a start time earlier than all available segments

* add tests

---------

Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2025-01-19 10:23:03 +01:00
Alessandro RosandGitHub 8f04264fe5 webrtxc: fix MTX_QUERY not set when reading or publishing (#4138) (#3937) (#4141) 2025-01-11 17:29:48 +01:00
Alessandro RosandGitHub 38f3662f7a playback: in /list, always return 404 when there are no timespans (#4131) 2025-01-10 16:53:28 +01:00
c7595a5cd8 playback: fix extraneous list entry when start time is specified (#4129)
* fix extraneous playback list entry when start time is specified

* add comment and test

---------

Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2025-01-10 16:20:25 +01:00
Alessandro RosandGitHub 21b5031d6b playback: improve /list performance (#3663) (#4102)
Segments are now parsed in parallel.
2025-01-03 13:59:49 +01:00
Alessandro RosandGitHub ac0ddc9e8a playback: improve /list response time (#3637) (#4096)
Response times of the /list endpoint were slow because the duration of
each segment was computed from scratch by summing the duration of each
of its parts.

This is improved by storing the duration of the overall segment in the
header and using that, if available.
2025-01-03 13:08:46 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>aler9
0f74cee372 build(deps): bump github.com/bluenviron/gohlslib/v2 from 2.1.0 to 2.1.1 (#4099)
* build(deps): bump github.com/bluenviron/gohlslib/v2 from 2.1.0 to 2.1.1

Bumps [github.com/bluenviron/gohlslib/v2](https://github.com/bluenviron/gohlslib) from 2.1.0 to 2.1.1.
- [Commits](https://github.com/bluenviron/gohlslib/compare/v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: github.com/bluenviron/gohlslib/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2025-01-02 13:10:57 +01:00
Alessandro RosandGitHub b49acb1e00 accept durations expressed as days (i.e. '1d') (#4094) 2025-01-02 12:44:15 +01:00
Alessandro RosandGitHub d38b7e95fc playback: allow filtering timespans by start and end date (#3637) (#3489) (#4085) 2025-01-02 12:43:18 +01:00
Alessandro RosandGitHub d13dc1074a make better use of Gin middleware system (#3849) 2024-10-08 17:02:16 +02:00
Alessandro RosandGitHub 534b637bc7 support using JWT in Authorization header with API, Metrics, PProf (#3630) (#3795) 2024-10-05 21:15:21 +02:00
Alessandro RosandGitHub 73a300afd0 fix cleaning of recordings in case of multiple recordDeleteAfter values (#3557) (#3741) 2024-09-08 20:33:18 +02:00
Alessandro RosandGitHub 6da35c8041 playback: add "url" field to recording timespans in /list (#3619) 2024-08-25 23:04:36 +02:00
Alessandro RosandGitHub 3f1d182d2c fix support for HTTP preflight requests (#1792) (#3535) 2024-07-06 21:45:15 +02:00
Alessandro RosandGitHub f4b7f147a5 api, playback: add CORS headers on non-existing pages too (#1792) (#3410) 2024-05-30 14:29:05 +02:00
Alessandro RosandGitHub 425b7fa4fb move pmp4 package into mediacommon (#3367) 2024-05-18 11:27:39 +02:00