PATCH: Fixed saved vods not saving in correct order, HLS segments save by system timestamp
This commit is contained in:
@@ -32,7 +32,7 @@ rtmp {
|
|||||||
hls_nested on;
|
hls_nested on;
|
||||||
hls_fragment 5s;
|
hls_fragment 5s;
|
||||||
hls_playlist_length 60s;
|
hls_playlist_length 60s;
|
||||||
hls_fragment_naming timestamp;
|
hls_fragment_naming system;
|
||||||
hls_cleanup off;
|
hls_cleanup off;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 = [f for f in listdir(stream_path) if f.endswith(".ts")]
|
||||||
ts_files.sort()
|
ts_files.sort()
|
||||||
|
print(ts_files)
|
||||||
|
|
||||||
# Create temp file listing all ts files
|
# Create temp file listing all ts files
|
||||||
with open(f"{stream_path}/list.txt", "w") as f:
|
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
|
# Remove ts files
|
||||||
for ts_file in ts_files:
|
for ts_file in ts_files:
|
||||||
remove(f"{stream_path}/{ts_file}")
|
remove(f"{stream_path}/{ts_file}")
|
||||||
|
# Remove m3u8 file
|
||||||
|
remove(f"{stream_path}/index.m3u8")
|
||||||
Reference in New Issue
Block a user