Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] obs-ffmpeg, hotkey: Implement replay buffer flush and save hotkey #7940

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anthonybaldwin
Copy link

@anthonybaldwin anthonybaldwin commented Dec 18, 2022

Description

Adds simple/advanced output replay buffer setting to allow flushing the replay buffer after the save button or hotkey is pressed.

Working on converting to a hotkey.

Motivation and Context

To cut down on duplicate footage in saved replay clips.

How Has This Been Tested?

WIP

Types of changes

  • New feature (non-breaking change which adds 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.

@anthonybaldwin anthonybaldwin force-pushed the flush-replay-buffer branch 3 times, most recently from eb27054 to ea79f31 Compare December 18, 2022 23:56
@anthonybaldwin anthonybaldwin marked this pull request as draft December 19, 2022 05:08
@RytoEX RytoEX added Bug Fix Non-breaking change which fixes an issue New Feature New feature or plugin labels Dec 20, 2022
@anthonybaldwin
Copy link
Author

I definitely welcome help, suggestions, ideas, criticism, etc. This has been a bit of a learning project for me as I'm basically new to the language. 😅 As you can see above I've been back and forth with ideas, and I'm still not sure if I'm on the best path...

@anthonybaldwin anthonybaldwin marked this pull request as ready for review December 20, 2022 05:38
@RytoEX
Copy link
Member

RytoEX commented Dec 20, 2022

I definitely welcome help, suggestions, ideas, criticism, etc. This has been a bit of a learning project for me as I'm basically new to the language. 😅 As you can see above I've been back and forth with ideas, and I'm still not sure if I'm on the best path...

PRs are reviewed as time allows. We're in the middle of the beta phase of a release cycle, so efforts are understandably focused on pure bug fixes rather than new features. It may be some time before someone is able to dig into this. Thank you for your understanding.

@anthonybaldwin
Copy link
Author

No rush at all.

@WizardCM WizardCM requested a review from Warchamp7 January 7, 2023 23:11
@WizardCM WizardCM added the UI/UX Anything to do with changes or additions to UI/UX elements. label Jan 7, 2023
@RytoEX
Copy link
Member

RytoEX commented Jan 23, 2023

After discussion, we don't want this as a checkbox, but we would be fine adding a separate hotkey that allows the user to save the replay buffer and flush it.

As a separate matter, it would be more expedient to get the bug fix in if it were submitted separately from a feature PR.

@anthonybaldwin
Copy link
Author

anthonybaldwin commented Jan 25, 2023 via email

@freya022
Copy link

Been using this pull request for a few hours of clips, and it seems to work great. Would be perfect if the second clip started exactly where the first output ended, as it would not require syncing when editing. Currently the second clip starts a bit before the first one ends (around 3 seconds of overlapping footage on my machine)

Thanks for this nice feature, been searching for it and found this PR luckily.

@anthonybaldwin
Copy link
Author

After discussion, we don't want this as a checkbox, but we would be fine adding a separate hotkey that allows the user to save the replay buffer and flush it.

As a separate matter, it would be more expedient to get the bug fix in if it were submitted separately from a feature PR.

Finally working on implementing this as a hotkey... Will update the above description and take care of the save button (051b4fe) in a separate PR.


And, RE:

Currently the second clip starts a bit before the first one ends (around 3 seconds of overlapping footage on my machine)

I believe that is a symptom of only flushing down to two keyframes. IIRC, I ran into issues otherwise. e.g.,

	if (flushing(stream)) {
		while (stream->keyframes >= 2)
			purge(stream);
		os_atomic_set_bool(&stream->flushing, false);
		return;
	}

Will see what I can figure out... May need some help on that one.

@anthonybaldwin anthonybaldwin changed the title obs-ffmpeg, UI: Implement flush replay buffer after save [WIP] obs-ffmpeg, hotkey: Implement replay buffer flush and save hotkey Jul 4, 2023
@anthonybaldwin anthonybaldwin force-pushed the flush-replay-buffer branch 3 times, most recently from 6c3a453 to d07af74 Compare January 13, 2024 20:44
Hotkey to flush and save the replay buffer. This can help cut down on
duplicate footage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Non-breaking change which fixes an issue New Feature New feature or plugin UI/UX Anything to do with changes or additions to UI/UX elements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants