[HELP] I want the m3u8 file to contain the oldest segments instead of the newest.
I have an FFmpeg command like this:
ffmpeg -i test.mp4 -f hls -hls_time 2 -hls_wrap 10 -hls_list_size 5 test.m3u8
Afaik, hls_wrap is the number of segments we want to store locally and hls_list_size is the segment listed in the m3u8 output file. The command above will generate 10 files of the video segment.
[seg 0][seg 1][seg 2][seg 3][seg 4][seg 5][seg 6][seg 7][seg 8][seg 9]
And inside the test.m3u8, of course, there are 5 newest segment mentioned.
[seg 5][seg 6][seg 7][seg 8][seg 9]
I want the test.m3u8 lists the oldest available segment instead of the newest. So it should contain:
[seg 0][seg 1][seg 2][seg 3][seg 4]
In another word, I want to preload the segments before it listed in test.m3u8.
The idea is I want to rsync the output of that FFmpeg command to a different folder on the network. I want to avoid test.m3u8 contains a segment that not completely copied because of the large segment size.
Please help me and pardon my English. Thank you very much!
Posted Jun 1, 2021, 12:26 PM UTC