PATCH: Refactored underlying file system for streams, seperated vods, streams and thumbnails

This commit is contained in:
2025-02-12 01:29:54 +00:00
parent 1b167b60f1
commit 55fed8a778
7 changed files with 92 additions and 46 deletions

View File

@@ -24,7 +24,7 @@ rtmp {
live on;
hls on;
hls_path /stream_data/hls;
hls_path /stream_data/;
allow publish 127.0.0.1;
deny publish all;
@@ -76,24 +76,24 @@ http {
}
# The MPEG-TS video chunks are stored in /tmp/hls
location ~ ^/stream/user/(.+\.ts)$ {
alias /stream_data/hls/$1;
location ~ ^/stream/(.+)/(.+\.ts)$ {
alias /stream_data/$1/stream/$2;
# Let the MPEG-TS video chunks be cacheable
expires max;
}
# The M3U8 playlists location
location ~ ^/stream/user/(.+\.m3u8)$ {
alias /stream_data/hls/$1;
location ~ ^/stream/(.+)/(.+\.m3u8)$ {
alias /stream_data/$1/stream/$2;
# The M3U8 playlists should not be cacheable
expires -1d;
}
# The thumbnails location
location ~ ^/stream/user/thumbnails/(.+\.jpg)$ {
alias /stream_data/thumbnails/$1;
location ~ ^/stream/(.+)/thumbnails/(.+\.jpg)$ {
alias /stream_data/$1/thumbnails/$2;
# The thumbnails should not be cacheable
expires -1d;