nginx-rtmp-module
nginx-rtmp-module copied to clipboard
RTMP HLS m3u8 file does not mention all ts files
NGINX 1.23.1. RTMP module 1.2.2.
Issue is on MacOS 13.1 and possibly on Ubuntu 22.04 too.
Problem:
I stream a video to NGINX RTMP. The HLS settings generate 24 .ts
files. While the first few .ts
files are generated, I see the corresponding .ts
entries being made in the m3u8
file. But when the video finishes streaming, the m3u8
file contains only this:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:24
#EXT-X-TARGETDURATION:10
#EXTINF:8.334,
21.ts
#EXTINF:10.000,
22.ts
#EXT-X-DISCONTINUITY
#EXTINF:9.996,
23.ts
#EXT-X-DISCONTINUITY
#EXTINF:3.764,
24.ts
#EXT-X-DISCONTINUITY
#EXTINF:3.764,
24.ts
#EXT-X-ENDLIST
What happened to the entries for 0.ts
, 1.ts
, 2.ts
etc.?
Tried including rtmp_auto_push on;
too, but it didn't solve the problem. Any way to fix this?
you should set config hls_cleanup
https://github.com/dreamsxin/nginx-rtmp-wiki/blob/master/Directives.md#hls_cleanup