Welcome, Guest
Username Password: Remember me
  • Page:
  • 1

TOPIC: Audio goes out of sync

Audio goes out of sync 4 months, 2 weeks ago #157991

  • stripedog
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • 4 months, 2 weeks ago
Hello!

I've searched the forums and tried my best google-fu. No luck.

The scenario is simple. I have a video from a Canon 60D recording a speaker. I have another recording from a phone using a lapel mic. I would like to sync them up so that I can use the better audio source for the speaker.

To the best of my understanding, the video seems to be recorded at a constant frame rate:

Format : MPEG-4
Format profile : QuickTime
Codec ID : qt 2007.09 (qt /CAEP)
File size : 3.33 GiB
Duration : 9 min 53 s
Overall bit rate : 48.2 Mb/s

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L5
Format settings : 1 Ref Frames
Format settings, CABAC : No
Format settings, RefFrames : 1 frame
Format settings, GOP : M=1, N=15
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 9 min 53 s
Bit rate : 46.7 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Original height : 1 088 pixels
Display aspect ratio : 16:9
Original display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.751
Stream size : 3.22 GiB (97%)
Language : English
Encoded date : UTC 2017-09-17 18:35:41
Tagged date : UTC 2017-09-17 18:35:41
Color range : Full
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.601

Audio
ID : 2
Format : PCM
Format settings : Little / Signed
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : sowt
Duration : 9 min 53 s
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 109 MiB (3%)
Language : English
Encoded date : UTC 2017-09-17 18:35:41
Tagged date : UTC 2017-09-17 18:35:41


The lapel mic audio was originally recorded at 44.1 kHz, but I opened it in audacity and tried to export it as 48kHz as a troubleshooting measure (to match the audio recorded by the camera):

Format : Wave
File size : 54.8 MiB
Duration : 9 min 58 s
Overall bit rate mode : Constant
Overall bit rate : 768 kb/s

Audio
Format : PCM
Format settings : Little / Signed
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : 1
Duration : 9 min 58 s
Bit rate mode : Constant
Bit rate : 768 kb/s
Channel(s) : 1 channel
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 54.8 MiB (100%)

The duration of the camera audio and the lapel mic audio is different, which is to be expected - I began recording with the lapel mic a few seconds before getting the camera rolling. I clapped my hands together as a reference, thinking it would help line up the audio between the camera and the externally recorded sound. Initially the edit seemed to line up relatively accurately, but by 5 minutes into the lecture the sound and video are hopelessly out of sync.

Any thoughts? If I didn't already drink like a fish this issue would have driven me to it. As it is I am running out of whiskey and at that point all hope is lost.

Re: Audio goes out of sync 4 months, 2 weeks ago #157993

  • hugly
  • OFFLINE
  • Platinum Boarder
  • Posts: 12245
  • 4 months, 2 weeks ago
Hello and welcome!

Sample rate (48 kHz vs 44.1 kHz) shouldn't have any influence on audio speed, otherwise this would indicate a severe bug in audio decoder of Lightworks.

Theoretically your devices might have different (wrong) internal clock references which can cause audio drift or wow/flutter, but nowadays that's very unlikely (with recordings shorter than 30 minutes).

Wrong Pre-ingest sync settings for audio-only media might be the cause of your problem.

To find out, please create a new project and select 30fps when creating. Right-click into Local Files (Import window) and select “Import Commands.Audio-only media.Pre-ingest sync.Picture @ 29.97fps", import video and audio-only..

.. and see what happens.
It's better to travel well than to arrive...
Last Edit: 4 months, 2 weeks ago by hugly.

Re: Audio goes out of sync 4 months, 1 week ago #158497

  • stripedog
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • 4 months, 1 week ago
Hi Hugly!

Thanks for the help!

Unfortunately, that doesn't seem to help at all. I created a new project at 30 fps. I right-clicked on both video and audio clips before importing them to bring up the Import Commands menu, and it appears to have already set Audio-Only media to Pre-ingest sync at Picture @ 29.97fps. No luck.

Any ideas?

Re: Audio goes out of sync 4 months, 1 week ago #158505

  • pfbr6a
  • Pro User
  • OFFLINE
  • Platinum Boarder
  • Posts: 562
  • 4 months, 1 week ago
The Header info looks solid.

Assuming a) that the audio and video in the MP4 file are in sync, and you get the problem only when trying to sync-up the separate audio file in LW, and b) the sync problem is identical whether you use the original 44.1 KHz or converted 48Khz audio file.

Is that right? If so, there are a few possibilities:

1/ The clock on the original video recording was off, so that the recording covered some different time than the nominal one.

2/ Ditto for the audio recording.

3/ The header information of the video or audio file does not match the content.

3/ Lightworks is misunderstanding some aspect of the specification of the files.

4/ There is something weird in your computer.

No consideration of probability, but it has to be one of these.

So, a couple of tests to pick them apart.

1/ does the video really play for 9'53" as measured by playing it on (say) VLC and timing it with a clock?

2/ does the audio really play for 9'58" ?

If one or other of these is wrong, is it any different on another computer?

This gives enough information to look further.

Re: Audio goes out of sync 4 months, 1 week ago #158574

  • hugly
  • OFFLINE
  • Platinum Boarder
  • Posts: 12245
  • 4 months, 1 week ago
stripedog wrote:
No luck.
Any ideas?

There are other issues related to AVC/AAC.MP4 format which can cause sync issues under certain circumstances.

To exclude this possibility, please transcode your Canon camera footage to an edit-friendly format and try again. Here you’ll find a Procedure to transcode to MPEG2 I-Frame HD format using Eyeframe Converter .
It's better to travel well than to arrive...
Last Edit: 4 months, 1 week ago by hugly.

Re: Audio goes out of sync 4 months, 1 week ago #158779

  • stripedog
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • 4 months, 1 week ago
Thanks for the help!

I don't a lot of time tonight so I gave Hugly's idea a shot first.

I converted the file using the instructions linked to in your post, and set up a new project for it. No luck - same drift. Any other thoughts?

I'll give pfbr6a's timing test a shot tomorrow. Not sure what to do at that point though.

Re: Audio goes out of sync 4 months, 1 week ago #158808

  • hugly
  • OFFLINE
  • Platinum Boarder
  • Posts: 12245
  • 4 months, 1 week ago
If you can't figure out the cause of your problems, please describe exactly the nature of the sync issues.

In order to find that out, you should align audio to video at a sync point, preferably at the very beginning of the timeline and then observe the nature of the sync issue. Is audio faster than video or is it slower, or does that change over time, sometimes in sync, sometimes advanced, sometimes delayed?

If you encounter a constant drift, the difference in seconds related to video duration would be interesting to know.

A constant drift of audio related to video would be fixable. If speed of audio related to video varies, you're in trouble.

I've attached a demo video which shows one way how to align video to audio in Fixed layout. A slate was used in the video as sync point. In any case make sure that frame rate and pre-ingest sync settings match.
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
It's better to travel well than to arrive...
Last Edit: 4 months, 1 week ago by hugly.

Re: Audio goes out of sync 4 months ago #159370

  • stripedog
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • 4 months ago
Hugly,

At first I thought that the Audio consistently ran faster than the video over time - IE, toward the end of a 10 minute clip, the audio was running closer to 1.5 or 2 seconds ahead of the video.

However, after taking a closer look over the course of the video, I suspect there are periods where this gap can extend longer than 2 seconds (by .25 or so) and run less than 1.5 seconds, according to the audio track from the camera.

So, I would characterize it as slowly generally going out of sync in one direction - audio running faster than the video - but I'm not quite sure how perfectly consistent it is.

I will move the project to another computer next to see if there is any difference.

Re: Audio goes out of sync 4 months ago #159384

  • hugly
  • OFFLINE
  • Platinum Boarder
  • Posts: 12245
  • 4 months ago
If you would provide native video and audio at a file hoster of your choice (e.g. Google Drive), I'd try to find out what's wrong.
It's better to travel well than to arrive...
  • Page:
  • 1
Time to create page: 0.60 seconds
Scroll To Top