Commit Graph
39 Commits
Author SHA1 Message Date
Alessandro RosandGitHub ae21240c76 add additional checks on always-available streams (#5408)
make sure that published streams match MPEG-4 audio, G711 and LPCM
parameters declared in configuration or used by the offline file.
2026-02-06 16:06:24 +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
Alessandro RosandGitHub 02fe2e2b42 tests: fix race condition (#5354) 2026-01-17 23:21:34 +01:00
Alessandro RosandGitHub 653d10fb75 use the same filtering process for every codec (#5324)
this allows to apply features that were previously implemented for
single codecs (like RTP packet resizing), to any codec, and simplifies
future development.
2026-01-16 14:03:13 +01:00
bluenviron-botandGitHub 320bd3f4ae bump golangci-lint to 2.8.0 (#5350) 2026-01-15 22:43:32 +01:00
Alessandro RosandGitHub eba3b828a6 print last processing error (#5323) 2026-01-06 21:48:36 +01:00
Alessandro RosandGitHub cd34de8770 print last decode error (#5319)
decode errors are still grouped together, but the last one is now
printed.
2026-01-05 15:28:24 +01:00
Alessandro RosandGitHub 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 RosandGitHub f5f03562d3 rewrite Unit definition (#5079)
Stream units now share the same struct, with a specialized payload.
2025-10-11 12:18:51 +02:00
Alessandro RosandGitHub cd80814009 do not include recorder and HLS muxer in sent bytes (#4380) (#5039)
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 RosandGitHub e3b8af8933 switch to gortsplib/v5 (#4978) 2025-09-16 13:10:34 +02:00
Alessandro RosandGitHub 57021467e9 rename formatprocessor into codecprocessor (#4962) 2025-09-12 10:24:11 +02:00
Alessandro RosandGitHub d423a71aaa update linter settings (#4790) 2025-07-26 16:44:32 +02:00
Alessandro RosandGitHub 9ddcbf5c97 recorder: limit maximum part size (#4674) (#4760)
this prevents RAM exhaustion.
2025-07-20 19:16:33 +02:00
Alessandro RosandGitHub 1083eea307 make RTP packet size compatible with RTSP/SRTP (#4692)
when RTSP encryption is enabled, maximum RTP packet size is slightly
decreased to make room for SRTP.
2025-07-05 15:42:58 +02:00
Alessandro RosandGitHub b564dc9ff1 rtsp: emit log message when remuxing RTP packets (#4422) 2025-04-13 10:21:46 +02:00
Alessandro RosandGitHub 14eb9f6175 improve tests (#4423) 2025-04-13 10:00:52 +02:00
Alessandro RosandGitHub 0d46cf3f74 rename stream decode errors into processing errors (#4370)
Stream errors include both errors from decoding RTP packets into
frames, and errors from encoding frames into RTP packets. "processing
errors" is more fit.
2025-03-26 15:14:08 +01:00
Alessandro RosandGitHub f851cb6961 add missing Start() call; fix wrong sprintf (#4369) 2025-03-26 12:47:09 +01:00
Alessandro RosandGitHub 986e270862 count and log all discarded frames, decode errors, lost packets (#4363)
Discarded frames, decode errors and lost packets were logged
individually, then there was a mechanism that prevented more than 1 log
entry per second from being printed, resulting in inaccurate reports.

Now discarded frames, decode errors and lost packets are accurately
counted, and their count is printed once every second.
2025-03-25 21:59:58 +01:00
Alessandro RosandGitHub 416ac1357e bump mediacommon and gortsplib (#4364) 2025-03-24 17:25:18 +01:00
Alessandro RosandGitHub b329c4bbe8 replace New* with Initialize() (#4345) 2025-03-16 15:34:53 +01:00
Alessandro RosandGitHub 5cb5dc4e12 remove useless checks (#4213) 2025-01-31 20:57:50 +01:00
Alessandro RosandGitHub 57addb1cc2 api, metrics: add additional RTSP statistics (#3312) (#4073) 2024-12-25 15:43:41 +01:00
Alessandro RosandGitHub 23002d9f5f route original timestamps without converting to durations (#3839)
This improves timestamp precision.
2024-10-07 17:59:32 +02:00
Alessandro RosandGitHub 2586782031 fix race condition in tests (#3834) 2024-10-05 21:54:11 +02:00
Alessandro RosandGitHub 4c3ac34425 fix memory leak in case of errors during initialization of a reader (#3831) 2024-10-05 00:49:44 +02:00
Alessandro RosandGitHub ad58efe47d move RTMP tests into internal/servers/rtmp (#3035) 2024-02-16 23:27:27 +01:00
Alessandro RosandGitHub 514036d41a treat different RTSP formats as different tracks in logs and API (#2907) 2024-01-15 12:08:14 +01:00
4bf0d10079 metrics: add paths_bytes_sent, srt_conns, srt_conns_bytes_received, srt_conns_bytes_sent (#2620) (#2619) (#2629)
* add missing Prometheus exports (#2620, #2619):
paths_bytes_sent, srt_conns, srt_conns_bytes_received, srt_conns_bytes_sent

* protect Stream.BytesSent()

* add tests

---------

Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2023-11-08 11:20:16 +01:00
Alessandro RosandGitHub 95ab9375c7 support recording to MPEG-TS (#2505) 2023-10-14 22:52:10 +02:00
Alessandro RosandGitHub 73ddb21e63 implement native recording (#1399) (#2255)
* implement native recording (#1399)

* support saving VP9 tracks

* support saving MPEG-1 audio tracks

* switch segment when codec parameters change

* allow to disable recording on a path basis

* allow disabling recording cleaner

* support recording MPEG-1/2/4 video tracks

* add microseconds to file names

* add tests
2023-09-16 17:27:07 +02:00
Alessandro RosandGitHub c4cb4200ff split RTP packet handling from data handling (#2337) 2023-09-16 17:16:33 +02:00
Alessandro RosandGitHub ffa34428fc fix bug that prevented multiple readers from accessing the same stream (#2281) (#2282) 2023-09-01 23:15:27 +02:00
Alessandro RosandGitHub 5fb7f4e846 force all readers to use an asynchronous writer (#2265)
needed by #2255
2023-08-30 11:24:14 +02:00
Alessandro RosandGitHub 30b7245bb9 limit logging of decode errors (#2253) 2023-08-26 23:34:39 +02:00
Alessandro RosandGitHub cf86dbb303 switch to gortsplib/v4 (#2244) 2023-08-26 18:54:28 +02:00
Alessandro RosandGitHub e0fb11040e move units into dedicated package (#2245)
needed by #2244
2023-08-25 18:11:02 +02:00
Alessandro RosandGitHub db3862cf0d move stream in a dedicated package (#2121)
needed by #2068
2023-07-30 22:34:35 +02:00