Commit Graph
55 Commits
Author SHA1 Message Date
Alessandro RosandGitHub 0eb7089ed6 use safer atomic structs instead of atomic functions (#5622) 2026-03-31 11:30:50 +02:00
Alessandro RosandGitHub 3381b196fb solve codec labels internally (#5603)
stop using gortsplib format.Format.Codec() for getting codec names.
2026-03-21 18:22:49 +01:00
Alessandro RosandGitHub c8e07b55d5 api: add new stats (#5582)
- RTSPSession.outboundRTPPacketsDiscarded
- Path.inboundFramesInError
- SRTConn.outboundFramesDiscarded
- WebRTCSession.outboundFramesDiscarded
- RTMPConn.outboundFramesDiscarded
- HLSMuxer.outboundFramesDiscarded
2026-03-17 17:22:15 +01:00
Alessandro RosandGitHub adf45596a3 api: rename WebRTC stats to match RTSP ones (#5581) 2026-03-16 23:29:25 +01:00
Alessandro RosandGitHub dfce20fefa api: add RTSP reported lost packets (#5198) (#5579)
The new outboundRtpPacketsReportedLost property allows to track RTP
packets that have been reported lost by readers. Furthermore, stats now
have a "inbound" or "outbound" prefix to improve readability.
2026-03-16 22:10:18 +01:00
Alessandro RosandGitHub 72832369f6 inherit MPEG-4 audio type from alwaysAvailableFile (#5539) 2026-03-01 10:12:35 +01:00
Alessandro RosandGitHub 05ab631996 refactor alwaysAvailable tests (#5537) 2026-03-01 00:20:20 +01:00
Alessandro RosandGitHub 2f91c8198c fix audio from alwaysAvailableFile not being streamed (#5535) 2026-02-28 21:46:25 +01:00
Alessandro RosandGitHub 10e0271755 fix corrupted video with alwaysAvailableFile (#5534)
when alwaysAvailableFile points to a file with a H265 or H264 track,
server is started, an online stream is published and then closed, video
was getting corrupted since the online video was overriding the
parameters of the offline video.
2026-02-28 21:06:07 +01:00
Alessandro RosandGitHub 4ebfcde8e2 fix MPEG-4 audio configuration not matching error (#5468) (#5533)
This happened when using alwaysAvailableFile and a MPEG-4 audio track.
2026-02-28 20:17:44 +01:00
Alessandro RosandGitHub 5e80554d20 improve playback precision of alwaysAvailable offline segment (#5530) 2026-02-28 18:39:52 +01:00
Alessandro RosandGitHub 549300cbd4 prevent using alwaysAvailableFile and alwaysAvailableTracks together (#5529) 2026-02-28 18:31:41 +01:00
Alessandro RosandGitHub 4974cacb94 improve video/audio sync of alwaysAvailable (#5443) (#5508)
store elapsed time once for the entire stream and start PTS of sub
streams from there.
2026-02-22 18:25:32 +01:00
2e429158a8 log packet sizes if UDPMaxPayloadSize is exceeded (#4668)
Co-authored-by: Alessandro Ros <aler9.dev@gmail.com>
2026-02-22 13:42:12 +01:00
bluenviron-botandGitHub a07526d57c bump Golang to 1.26 (#5460) 2026-02-21 14:48:53 +01:00
Alessandro RosandGitHub 336714157f fix codec parameters not being loaded from alwaysAvailableFile (#5484) 2026-02-18 21:29:24 +01:00
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