This is a little out there in terms of how many people would want this, but I for one have thousands of demos that needs this done so I would like to request it. It would be very much related to issue #57.
Basically, I would like there to be a feature as a button to automatically cut up the demo such that it splits a demo into each life. The following would be the pseudocode for this.
- make a backup of the original demo and the bookmarks files somewhere (as the demos.tf also notes this trimming operation as being unstable)
- Parse the demo file to retrieve ticks where the recording player dies
- Fence posting:
3-1. For the first time, if the demo starts while the recording player is waiting for respawn, trim the demo 1 second before the respawn of the recording player.
- For each death:
4-1. Trim the demo 2 seconds (or a configurable amount of time, for freeze cam) after the death.
4-2. Trim the demo 1 second before the respawn of the recording player.
4-3. Discard the ticks in between.
4-4. For the bookmarks file, trim and split them the same, and recalculate and rewrite the bookmarks for the tick numbers that changed for the latter demo.
4-5. (Optional) Do the same for VDM files if exist.
4-6. For the split demo files' names, concatenate the string "life-n"
- (Optional) After the for loop, ask the user if they want to delete lives where there was no recorded event in the newly-split bookmark files.
This way, any (casual) player can basically batch-lossly-compress their demos into only lives with highlights!
This is a little out there in terms of how many people would want this, but I for one have thousands of demos that needs this done so I would like to request it. It would be very much related to issue #57.
Basically, I would like there to be a feature as a button to automatically cut up the demo such that it splits a demo into each life. The following would be the pseudocode for this.
3-1. For the first time, if the demo starts while the recording player is waiting for respawn, trim the demo 1 second before the respawn of the recording player.
4-1. Trim the demo 2 seconds (or a configurable amount of time, for freeze cam) after the death.
4-2. Trim the demo 1 second before the respawn of the recording player.
4-3. Discard the ticks in between.
4-4. For the bookmarks file, trim and split them the same, and recalculate and rewrite the bookmarks for the tick numbers that changed for the latter demo.
4-5. (Optional) Do the same for VDM files if exist.
4-6. For the split demo files' names, concatenate the string "life-n"
This way, any (casual) player can basically batch-lossly-compress their demos into only lives with highlights!