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

[Bug: All platforms] Audio gets out of sync with Video if a Unity script lags. #448

Open
zezba9000 opened this issue Dec 17, 2024 · 0 comments
Assignees
Labels

Comments

@zezba9000
Copy link

zezba9000 commented Dec 17, 2024

Unity version

2022.3.8

Unity editor platform

Windows

AVPro Movie Capture edition

Full

AVPro Movie Capture Version

5.3.3

Which Windows version(s) are you using?

Windows 11

Which graphics API(s) are you using?

Direct3D 11

Hardware

i7-12700k
32gb 3200mhz ram
RTX 3060 12gb

Which capture component are you using?

Capture From Camera

Capture mode

Realtime

Which output mode are you using?

Video file

Video codecs

H264

Audio source

Unity

Audio codecs

AAC

Any other component configuration

No response

The issue

While recording Unity audio, if there is any stutter or lag in the game the audio will get off.
Sometimes it just slowly gets out of sync with video too. This happens on both Windows and Android.
If you call Thread.Sleep(2000) once while video is recording you can reproduce the issue easy FYI.

I have tried to make my own "CaptureFromCamera_Custom" object to try and resolve the issue with rendering extra frames to try and match audio data etc. While I've gotten close I can't seem to get it working without audio stuttering/crackles. I'm not sure if your native libraries are keeping track of anything that needs to know when the game thread gets locked up to keep things in sync.

This is preventing us from publishing some stuff we have build around it in our game.

Log output

No response

@zezba9000 zezba9000 changed the title All platforms [All platforms] Audio gets out of sync with Video if a Unity script lags. Dec 17, 2024
@zezba9000 zezba9000 changed the title [All platforms] Audio gets out of sync with Video if a Unity script lags. [Bug: All platforms] Audio gets out of sync with Video if a Unity script lags. Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants