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

Audio is ahead of video #7

Open
sirhideo opened this issue Dec 11, 2020 · 5 comments
Open

Audio is ahead of video #7

sirhideo opened this issue Dec 11, 2020 · 5 comments

Comments

@sirhideo
Copy link

The script works in my box in terms of generating aac and merging to the recording clip (mp4). However the audio is way ahead of the video after merging into 1 mp4 file. It is like 4 seconds ahead. Could you please help?

@DeadEnded
Copy link
Owner

if this is always the case, you may have to modify the merge command and offset one of the two streams. Look up the ffmpeg flags to find the correct one to shift one of the streams (can't remember it). That is what I would to if it is always ahead.

@DeadEnded
Copy link
Owner

Were you able to correct the timing on your recordings?
If so, it could be good to share it here for others if they have the same issue.

Cheers!
DeadEnd

@TSCM-Firestorm
Copy link

TSCM-Firestorm commented Apr 2, 2021

Had a similar issue when using it on mine. Offset the audio by +2 seconds with the -itsoffset flag and it worked for a start. The audio was in sync at the beginning but noticed was getting audio drift further in the video. Any ideas what would cause that?

@DeadEnded
Copy link
Owner

hmm... honestly no - I'm not an FFMPEG expect.
Some quick googling points in the direction of audio sample rate being different - since this is (I assume) is audio and video from the camera, it would be odd to have them drift... but that could be the cause. Somehow the rate of the video and the audio are different.

Based on that, I found an example of how to re-sample the rate to adjust it (this would fix a constant drift apart):
https://stackoverflow.com/a/37521155

See if that example helps!
DeadEnd

@zajaaczki
Copy link

I have the same issue. In VLC player: audio and video are synchronised but in motioneye not, 2-4 seconds delay.

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

No branches or pull requests

4 participants