Skip to content

Allow auto-syncing to be disabled for non-realtime streams #48

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

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

Conversation

microcosm
Copy link

No description provided.

@timscaffidi
Copy link
Owner

There is already an option to disable syncing to the system clock for video only streams. Is it your intention to allow recording video+audio without automatic synchronization?

@microcosm
Copy link
Author

Yes, exactly. I'm using synths to generate sound and drawing to an ofFbo to generate video frames. When everything runs at 60fps, it's fine and I don't need this feature. But sometimes I want to manipulate CPU-intensive graphics. I want to send exactly the right number of frames and the right amount of audio, and have it all render nicely to a video file.

This example shows where I'm at with it. The example code there works perfectly and lets you run at 30fps. I put real-time commands into a queue (see logCommand) so that the graphics and sound all sync up.

Everything works perfectly in that example, although I'm having trouble when I start working with heavy graphics, something is breaking the A/V sync when I do that.

@timscaffidi
Copy link
Owner

I see where you're coming from. However there is already bSysClockSync to control the synchronization, and while it does not accomplish what you want currently, I do not want to add another feature with such a similar sounding method name. I think it would be confusing as to which property controls what.

It might be better to just have one option for synchronization, but just change the behavior to support your use case. Essentially,
if ((bRecordAudio || bSysClockSync) && !bFinishing) {
would become
if (bSysClockSync && !bFinishing) {

I think just this change would support your use case, and if bSysClockSync were defaulted to true, there would be minimal impact to the majority of users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants