hlssink2: Index playlist file is written after each TS segment, unnecessary disk i/o
The index playlist is completely re-written with each new
*.ts file. This is an inefficient usage pattern for disk i/o, particularly with long streams (the index file can get rather large).
There are some scenarios where the file only needs to be written once (presumably after the final
*.ts file has been finished).
Possible fix 1
*.ts file is written, the playlist only needs to get a couple lines appended (corresponding to the latest
Possible fix 2
I propose a boolean property on the
hlssink2 element, maybe call it "write-intermittent-playlist", with a default value of true.
- If true, the current behavior is maintained.
- If false, the playlist is only written once (after the final