PATCH: Fixed saved vods not saving in correct order, HLS segments save by system timestamp

This commit is contained in:
2025-02-12 13:45:56 +00:00
parent ad1d2791c0
commit 01d611c227
2 changed files with 4 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ rtmp {
hls_nested on;
hls_fragment 5s;
hls_playlist_length 60s;
hls_fragment_naming timestamp;
hls_fragment_naming system;
hls_cleanup off;
}
}

View File

@@ -34,6 +34,7 @@ def combine_ts_stream(stream_path, vods_path):
"""
ts_files = [f for f in listdir(stream_path) if f.endswith(".ts")]
ts_files.sort()
print(ts_files)
# Create temp file listing all ts files
with open(f"{stream_path}/list.txt", "w") as f:
@@ -61,3 +62,5 @@ def combine_ts_stream(stream_path, vods_path):
# Remove ts files
for ts_file in ts_files:
remove(f"{stream_path}/{ts_file}")
# Remove m3u8 file
remove(f"{stream_path}/index.m3u8")