Commit Graph

26 Commits

Author SHA1 Message Date
aler9 a8822b9f15 hls muxer / source: route AAC units singularly
This aligns the HLS implementation with the rest of the server. In case
of HLS/MPEGTS, the server now generates an ADTS packet for each AU,
without grouping multiple AUs into a single ADTS packet.
2022-08-14 12:19:11 +02:00
aler9 af7a815f83 update gortsplib 2022-08-05 23:50:45 +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 37e22b96cd HLS muxer: support dynamic H264 SPS/PPS 2022-04-08 18:19:53 +02:00
aler9 0605a2f369 update linter 2022-04-07 13:05:07 +02:00
aler9 d0e7c3c100 update docs 2022-02-18 21:03:33 +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 4bd5289221 hls: set audio codec mime according to mpeg4 type 2022-01-30 11:33:05 +01:00
aler9 06cffc44df hls: move constants into right file 2021-09-23 11:14:57 +02:00
aler9 ef4b925209 hls: fix discontinuity of TS counters between segments 2021-09-07 12:02:44 +02:00
aler9 98bf53a1e8 hls: simplify audio pts generation 2021-09-07 10:24:57 +02:00
aler9 74f3be1eed hls: use audioAUCount only if audio is primary track 2021-09-07 10:23:32 +02:00
aler9 02afa8ff99 rtmp, hls: remove initial difference of 2secs between PTS and DTS of H264 2021-09-07 10:04:58 +02:00
aler9 e189f4570c hls, rtmp: set DTS = PTS when a IDR frame is received 2021-09-06 19:04:39 +02:00
aler9 b65207012c update gortsplib 2021-08-25 19:51:59 +02:00
aler9 92523c2a13 hls: insert segments into playlist only after they're complete
In this way, EXT-X-TARGETDURATION and EXTINF are always filled correctly.

If no segments have been generated yet, the playlist is not returned
until a segment is inserted or the muxer is closed. This causes timeout
issues on iOS Safari, that are solved by waiting for a fetch() before starting
the video.
2021-08-23 13:12:09 +02:00
aler9 96cb56621a hls: add primary playlist 2021-08-16 18:07:10 +02:00
aler9 ba41af91b2 hls: remove useless check 2021-08-15 09:23:19 +02:00
aler9 93b143395e hls: send PCR once, at the beginning of every TS segment 2021-08-14 17:25:40 +02:00
aler9 2d71e69e43 hls: speed up loading by decreasing PTS 2021-08-14 17:08:35 +02:00
aler9 600f7bf48c hls: move NALU filtering into hls muxer 2021-08-14 16:35:25 +02:00
aler9 3828b71206 fix docs 2021-08-14 13:52:57 +02:00
aler9 1146d5cf1b hls: new option hlsAlwaysRemux to always remux streams into HLS, not only when requested 2021-07-29 16:56:40 +02:00
aler9 4a1ca7aa3e hls: fix segment splitting error introduced by c3c643c6 2021-07-29 16:27:15 +02:00
aler9 c3c643c602 hls: move muxer into dedicated object 2021-07-24 18:31:54 +02:00