Skip to content

Conversation

@Strackeror
Copy link

@Strackeror Strackeror commented Feb 19, 2024

Description

This adds a 'save_duration' procedure to the replay buffer output that allows one to save a shorter part of the replay buffer.

Motivation and Context

There are a few requests out there to have 'multiple replay buffers' which usually means being able to have multiple hotkeys to save replays of different lengths. This was also my use case, I sometimes want to register the last 15 minutes of gameplay, but a lot more often I just want 30 seconds or so. See also this ideas link

The current way to have this are a bit janky at best, you either have to go for a somewhat out of date fork (https://github.com/TheDark/obs-studio), or use scripts that process the replay file after the fact.

This isn't a full implementation of multiple replay buffer lengths, but it makes it a lot easier for an external script to do it and do it consistently.

How Has This Been Tested?

I mostly tested this manually by saving shorter replays manually with a small lua script that just binds a hotkey to save the last 30 seconds. I also tried saving normal replays to confirm there was no effect on the base feature. I'm on a laptop with Windows 11 23H2 (OS Build 22631.3155) and a 3070, which is used for the encoding.
I only touched the code for saving the replay buffer and creating the replay buffer output, so those should be the only parts of the code subject to potential issues.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@Strackeror
Copy link
Author

Strackeror commented Feb 19, 2024

Additional notes: There may be a better way to handle the issue of starting the shorter replay inbetween keyframes, but I'm not super familiar with the handling of video.
I was also thinking of adding my basic script in the included scripts, not sure if that's a good idea.

@WizardCM WizardCM added the Enhancement Improvement to existing functionality label Feb 24, 2024
@Strackeror Strackeror force-pushed the clip_proc branch 2 times, most recently from 4c93858 to 9b537af Compare April 5, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Improvement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants