Commit Graph

350 Commits

Author SHA1 Message Date
aler9
5d78c81637 update gortsplib 2022-06-22 20:45:26 +02:00
aler9
3d5a0fa621 update gortsplib 2022-06-22 20:14:58 +02:00
aler9
10d47f8631 update gortsplib 2022-06-21 15:50:15 +02:00
aler9
e45820b2c0 hls server: show real client IPs when behind a proxy (#955) 2022-06-21 13:54:19 +02:00
aler9
039d106efa update gortsplib 2022-06-14 15:34:45 +02:00
aler9
d6bd722a7a update gortsplib 2022-06-11 19:30:41 +02:00
aler9
9d3fd3bc37 update gortsplib 2022-06-05 01:36:29 +02:00
aler9
c8f40f448a fix EOF error during DTS extraction 2022-06-03 12:48:45 +02:00
aler9
9bd8b2cfb6 rtmp server, hls muxer: fix DTS in case of B-frames and remove PTS-DTS offset 2022-06-03 11:31:39 +02:00
aler9
4073013f68 hls muxer: stop normalizing PTS 2022-06-02 22:37:46 +02:00
aler9
acd788d632 update gortsplib 2022-06-02 20:58:48 +02:00
aler9
e7f88bc12f move DTS extractor into gortsplib 2022-06-02 11:55:12 +02:00
aler9
93975552ac hls muxer: improve performance, decrease memory consumption 2022-06-01 10:13:37 +02:00
Alessandro Ros
e115983296
Implement Low-Latency HLS (#938)
* add hlsVariant parameter

* hls: split muxer into variants

* hls: implement fmp4 segments

* hls muxer: implement low latency mode

* hls muxer: support audio with fmp4 mode

* hls muxer: rewrite file router

* hls muxer: implement preload hint

* hls muxer: add various error codes

* hls muxer: use explicit flags

* hls muxer: fix error in aac pts

* hls muxer: fix sudden freezes with video+audio

* hls muxer: skip empty parts

* hls muxer: fix video FPS

* hls muxer: add parameter hlsPartDuration

* hls muxer: refactor fmp4 muxer

* hls muxer: fix CAN-SKIP-UNTIL

* hls muxer: refactor code

* hls muxer: show only parts of last 2 segments

* hls muxer: implementa playlist delta updates

* hls muxer: change playlist content type

* hls muxer: improve video dts precision

* hls muxer: fix video sample flags

* hls muxer: improve iphone audio support

* hls muxer: improve mp4 timestamp precision

* hls muxer: add offset between pts and dts

* hls muxer: close muxer in case of error

* hls muxer: stop logging requests with the info level

* hls muxer: rename entry into sample

* hls muxer: compensate video dts error over time

* hls muxer: change default segment count

* hls muxer: add starting gap

* hls muxer: set default part duration to 200ms

* hls muxer: fix audio-only streams on ios

* hls muxer: add playsinline attribute to video tag of default web page

* hls muxer: keep mpegts as the default hls variant

* hls muxer: implement encryption

* hls muxer: rewrite dts estimation

* hls muxer: improve DTS precision

* hls muxer: use right SPS/PPS for each sample

* hls muxer: adjust part duration dynamically

* add comments

* update readme

* hls muxer: fix memory leak

* hls muxer: decrease ram consumption
2022-05-31 19:17:26 +02:00
aler9
6de8277cb7 support SDPs with TIAS bandwidths (#948) 2022-05-23 21:30:41 +02:00
aler9
2fba878755 rtsp server: fix wrong RTP-Info header (#922)
- fix truncation to seconds of RTP time in RTP-Info
- add a small quantity to rtptime in RTP-Info
- add 1 to last sequence number in RTP-Info
2022-05-16 14:37:05 +02:00
aler9
7ecd52808a rtsp source: support cameras that provide base URL inside control attribute (#683) 2022-05-11 16:54:07 +02:00
aler9
d6a804f592 rtsp server: improve performance when reading with TCP 2022-05-11 16:37:33 +02:00
aler9
f521049e2f rtsp source: restore support for cameras with percent sign in password 2022-05-10 17:33:34 +02:00
aler9
901eae2f6b fix bias error in AAC timestamp 2022-05-10 13:29:32 +02:00
aler9
1ad0df128d rtsp source: fix timeout (https://github.com/aler9/rtsp-simple-server/discussions/897)
that happens when there's a UDP->TCP switch and Content-Base contains
an absolute URL
2022-05-02 19:03:00 +02:00
aler9
6c95ea2837 rtsp source: support AUs wrapped inside ADTS (#855) 2022-04-29 12:33:33 +02:00
aler9
411fb989eb hls client: add limit on NALU size 2022-04-29 12:23:13 +02:00
aler9
35b3541e4f hls client: add limit on AU size 2022-04-29 12:02:11 +02:00
aler9
91ce2dd886 rtsp server: fix reading with multicast when host is macOS (#895) 2022-04-21 13:54:19 +02:00
aler9
c700e309ce rtsp server: fix reading with ffplay and stateless ipv6 2022-04-21 13:16:56 +02:00
aler9
0912042fb1 hls muxer: do not increase version number of MPEG-TS tables unless there's a reason (https://github.com/asticode/go-astits/pull/38) 2022-04-21 09:20:08 +02:00
aler9
9098644802 rtsp source: fix parsing of transport header with dahua rtsp server (https://github.com/aler9/gortsplib/issues/121) 2022-04-21 09:02:44 +02:00
aler9
385e301728 rtsp server/source: support AAC tracks with indexlength=0 2022-04-15 18:44:00 +02:00
aler9
6b86607092 rtsp source: improve support for AAC tracks with custom parameters 2022-04-15 17:01:18 +02:00
aler9
db7ee22789 rtsp source: support AAC tracks with custom sizelength, indexlength and indexdeltalength
(https://github.com/aler9/gortsplib/pull/118)
2022-04-15 13:17:00 +02:00
aler9
2a0dc3b63d rtsp: improve performance; add upper limit on NALU/AU size to prevent RAM exhaustion 2022-04-10 15:34:33 +02:00
aler9
98c6cd4650 RTSP: automatically remux oversized RTP/H264 packets; drop parameter ReadBufferSize 2022-04-09 20:20:14 +02:00
aler9
50d1079f70 RTSP: fix multicast TTL; set default multicast TTL to 16 (#873) 2022-04-09 11:28:40 +02:00
aler9
d929197b21 propagate H264 packets throughout the server 2022-04-08 18:19:53 +02:00
aler9
3fc4ca6465 update gortsplib; downgrade pion/rtp to v1 2022-04-01 12:04:21 +02:00
aler9
f53b316c0d rtsp server: generate RTCP sender reports automatically; stop routing RTCP packets 2022-03-24 15:44:34 +01:00
aler9
a6986e9fa4 update gortsplib 2022-03-24 12:59:22 +01:00
aler9
8cb2a7ffd4 rtsp source: support servers that sends UDP packets with a different IP (https://github.com/aler9/gortsplib/pull/108) 2022-03-18 16:58:28 +01:00
aler9
544c192103 update gortsplib 2022-03-15 12:59:10 +01:00
aler9
e611c7ddfd RTSP source: skip tracks with an invalid clock rate (#832) 2022-03-15 12:37:02 +01:00
aler9
245d58ee47 RTSP server: set timeout in Session header only when client is playing and protocol is UDP 2022-03-09 10:09:03 +01:00
aler9
6dc11c2906 RTSP server/source: fix encoding of RTP packets with padding
This fixes a SIGSEGV with GStreamer.
2022-03-08 12:54:23 +01:00
aler9
20a8862b2f RTSP source: restore packet buffering with the UDP transport 2022-03-07 22:45:23 +01:00
aler9
87f24f1704 update gortsplib 2022-02-19 23:06:24 +01:00
aler9
d7edf42c40 rtsp server: restore authentication (#840) 2022-02-19 22:06:57 +01:00
aler9
5f9b705a03 RTSP server: remove Session header from ANNOUNCE responses (#840) 2022-02-19 19:25:27 +01:00
aler9
16df033d21 update gortsplib 2022-02-19 16:08:10 +01:00
aler9
43471a05ab update gortsplib 2022-02-18 10:24:33 +01:00
aler9
5504ff44b6 rtsp: parse all incoming RTP/RTCP packets 2022-02-18 00:14:52 +01:00
aler9
ae7b1c2ea6 rtmp, hls: fix wrong timestamp computation that happened at 28h28m
this was caused by a int64 overflow.
2022-02-13 17:03:19 +01:00
aler9
7c1d329d61 rtsp server: fix multicast listen error on Windows (#742)
This happened when the system has network interfaces that don't support multicast.
2022-02-02 18:32:09 +01:00
aler9
6c7fd8ee6f fix bad track cloning and restore HLS audio support (#808) 2022-02-01 19:24:33 +01:00
aler9
f330cc6997 rtsp source: fix crash in case a PLAY request fails 2022-01-31 10:03:55 +01:00
aler9
343a5f17fb hls: add new parameter hlsSegmentMaxSize 2022-01-30 17:54:05 +01:00
aler9
2bfdcc7d89 update gortsplib 2022-01-30 17:43:03 +01:00
aler9
9bc364fa21 support H264 tracks that contains extra data in sprop-parameter-set 2022-01-30 14:30:01 +01:00
aler9
b8bf747796 update gortsplib 2022-01-23 22:41:07 +01:00
aler9
6f5bc158cd do not treat generic bytes as strings into errors
this avoid invalid log messages
2022-01-23 12:43:50 +01:00
aler9
54d950b0af RTSP server: send session timeout to clients through the session header (#702) 2022-01-20 16:39:07 +01:00
aler9
c6a4794a25 RTSP source: set keepalive by using the session header
This fixes timeouts with a lot of cameras, when using UDP.
2022-01-20 12:04:07 +01:00
aler9
530e8f8467 rtsp source: fix '401 Unauthorized' error with some Hikvision cameras
when automatically switching protocol
2022-01-18 16:22:31 +01:00
aler9
7005108313 hls, rtmp: fix timestamp decoding in case of an overflow followed by a negative time diff 2022-01-18 11:56:09 +01:00
aler9
8a9c8243e4 fix transport header error with some Hikvision cameras
fixes 'invalid transport header: encoding/hex: invalid byte: U+0020 ' ''.
2022-01-05 12:10:21 +01:00
aler9
de70566179 hls, rtmp: fix DTS generation, avoid non-increasing DTS 2021-12-10 23:03:17 +01:00
aler9
a54ecaefe1 hls, rtmp: compute duration correctly in case of an RTP overflow 2021-12-09 20:28:45 +01:00
aler9
9a19635b1c restore 32bit support 2021-12-08 18:18:14 +01:00
aler9
f041af2b65 rtsp server: slightly improve performance when reading with TCP 2021-12-08 17:54:05 +01:00
aler9
26facc24f2 rtsp server: write UDP packets in parallel.
A goroutine writer is allocated for each session and
for each multicast stream.

This increases bandwidth and prevents freezes caused
by lagging readers.
2021-12-07 23:13:55 +01:00
aler9
8cf40a21d8 rtsp server, rtsp source: send receiver reports only after receiving a sender report 2021-12-06 17:17:59 +01:00
aler9
c65f4509bd update gortsplib 2021-12-05 14:36:57 +01:00
aler9
a1fed6fb38 rtsp source: set ServerName when using TLS (#708) 2021-12-03 23:33:28 +01:00
aler9
6c3302a83f rtsp source: send receiver reports even with sourceAnyPortEnable (#698) 2021-11-30 22:24:37 +01:00
aler9
05b1a7e720 update gortsplib 2021-11-28 13:04:00 +01:00
aler9
21cf17e65e rtsp server: reply with code 454 when session is not found 2021-11-26 15:53:59 +01:00
aler9
411a35e89f rtsp source: fix EOF error that happens when using TCP with some cameras (#548) 2021-11-18 12:18:56 +01:00
aler9
b4155a4fdf rtsp: support reading with VLC and multicast 2021-11-15 17:58:14 +01:00
aler9
958c333cde rtsp source: support reading from servers that use random UDP ports (#691) 2021-11-13 10:15:58 +01:00
aler9
f7419586af update gortsplib 2021-11-12 22:29:56 +01:00
aler9
d5c55a8ddc move test into gortsplib 2021-11-06 13:38:51 +01:00
aler9
5f3ceb6d1e rtsp source: fix detection of GET_PARAMETER support 2021-11-06 12:09:46 +01:00
aler9
a867c469fd fix automatic deletion of regexp paths (#664) (#680) 2021-11-03 22:28:50 +01:00
aler9
eab2663420 move VLC authentication hack into gortsplib 2021-10-30 15:05:27 +02:00
aler9
0c4cfd0e53 update gortsplib 2021-10-30 13:55:05 +02:00
aler9
8df5c52a6c rtsp: make VLC-related error message more clear when 2021-10-28 18:40:57 +02:00
aler9
8875c8eaa6 rtsp: print exact reason when a session is destroyed (#649) 2021-10-27 19:49:43 +02:00
aler9
509bed355a update gortsplib 2021-10-22 18:41:10 +02:00
aler9
ae0d959892 update go-astits 2021-10-01 14:05:20 +02:00
aler9
fc46c33a96 avoid crash when proxing HLS (#558) 2021-09-30 11:49:06 +02:00
aler9
e851640ab6 avoid crash in case of invalid H264 SPS (#590) 2021-09-28 22:26:26 +02:00
aler9
e78544f23e update gortsplib 2021-09-28 15:47:56 +02:00
aler9
54292d712e convert the configuration into JSON before loading it 2021-09-27 16:40:49 +02:00
aler9
68ab5c05f6 move aac utilities into gortsplib 2021-09-23 20:24:10 +02:00
aler9
3b0327233e move hls utils into gortsplib 2021-09-23 20:14:20 +02:00
aler9
aec5f53756 rtsp: do not allow a client to control a session created with a different IP 2021-09-23 19:54:29 +02:00
aler9
2d5e1fa823 use crypto/rand instead of math/rand to avoid port conflicts and security issues 2021-09-23 19:38:40 +02:00
aler9
21539d341c update gortsplib; this include:
* do not allow a session to setup UDP tracks from different IPs
* do not allow a reader to use the same UDP ports of another reader
2021-09-23 19:20:34 +02:00
aler9
df4c268813 support proxying HLS 2021-09-05 18:00:29 +02:00
aler9
b65207012c update gortsplib 2021-08-25 19:51:59 +02:00
aler9
57f465ccd8 rtsp source: support servers that change interleaved IDs 2021-08-25 18:10:20 +02:00