[solved] waveform and audio out of sync

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

ashic.mahtab

  • Posts: 11
  • Joined: Thu May 19, 2022 2:16 pm
  • Real Name: Ashic Mahtab

[solved] waveform and audio out of sync

PostThu Jan 12, 2023 3:39 am

I'm running Resolve Studio 18.1.2 Build 6 on Linux. After having issues on a project, I seem to have triangulated the problem with the waveform viewer / audio player. It appears that the audio player inside resolve is playing things *after* the point where the waveform shows it should.

For a minimal reproduction, I created a new project, and put mp3 and wav files into a media bin. Without any timelines or video or anything else added, I played the audio from within the bin. This shows the waveform and plays the audio. In the waveform, a beat starts where the red marker is, but it should start a bit earlier.
capture.png
waveform
capture.png (126.17 KiB) Viewed 2092 times


This seems to be consistent for me across various audio files.

I first noticed this when working on a project. I'd noticed that the waveform peaks happened a bit earlier (visually) than when sounds would play in the preview. After syncing the video clip cuts to the music, when I rendered it, I was surprised to see that in the final render, the audio happens according to what the waveform shows, rather than when the preview plays them. As such, if clips are aligned to music in the preview, in the final render, they're all over the place.

So, I think for whatever reason, the audio player inside my Resolve is playing audio with a bit of delay. This is not drift (i.e. it's even at the start of the audio files), and the final render seems to correspond to the waveform. I've tried mp3 files from youtube audio library, bensound, etc. These tend to be 44.1khz. I've tried converting them to wav, and also converting to wav with 48k. The same issue persists. The audio file used for the attached waveform is https://www.bensound.com/royalty-free-music/track/dreams-chill-out

I'm running on an AMD 5950X with a 3090 GPU and 64GB of ram and an NVME SSD.
Last edited by ashic.mahtab on Fri Jan 13, 2023 10:34 am, edited 1 time in total.
Offline
User avatar

Daz Wood

  • Posts: 455
  • Joined: Mon May 08, 2017 2:59 pm

Re: waveform and audio out of sync

PostThu Jan 12, 2023 9:13 am

What's it like if you start a new project by first add video file with audio and let resolve set the video frame rate if it asks, then try adding an audio file?
Thank you

Daz
Davinci Resolve Studio Version
ASUS Strix GL702ZC 17" laptop. AMD Ryzen 7 1700 (Desktop CPU), 32GB DDR4, Storage 256GB M.2 SSD, 2TB SSD, 4GB RX 580, Win10
Offline

ashic.mahtab

  • Posts: 11
  • Joined: Thu May 19, 2022 2:16 pm
  • Real Name: Ashic Mahtab

Re: waveform and audio out of sync

PostThu Jan 12, 2023 9:43 am

Hey Daz, it's the same. In fact, that's how I first found the problem. The timeline waveform was out of sync with the preview player. I then tried to play just from the media bin in an existing and new project. It appears that it's the preview audio player that's lagging as the final rendered output is in sync with the waveform.
Offline

ashic.mahtab

  • Posts: 11
  • Joined: Thu May 19, 2022 2:16 pm
  • Real Name: Ashic Mahtab

Re: waveform and audio out of sync

PostThu Jan 12, 2023 11:52 am

Update: I tried with Studio 17 and 18 on a Mac M1 Pro, and that does NOT have the audio player lag in respect to the waveform (using the exact same mp3 files). So it seems to be something related to either my desktop hardware or Linux.
Offline

ashic.mahtab

  • Posts: 11
  • Joined: Thu May 19, 2022 2:16 pm
  • Real Name: Ashic Mahtab

Re: waveform and audio out of sync

PostThu Jan 12, 2023 5:08 pm

I think I've figured out that it's to do with pipewire. I'm using pipewire-pulse and pipewire-alsa. Seems like there's a bug in there somewhere. Switching to pulseaudio-alsa gets rid of the lag, however, that doesn't work with my bluetooth headphones. I'm seeing references to pipewire and resolve, and that the latest versions should have fixed it... apparently not. But seems like that's the core issue at this point.
Offline

ashic.mahtab

  • Posts: 11
  • Joined: Thu May 19, 2022 2:16 pm
  • Real Name: Ashic Mahtab

Re: waveform and audio out of sync

PostFri Jan 13, 2023 10:33 am

I think I've managed to solve it. The issue is definitely with pipewire and alsa, and even though pipewire claims to have recently solved it, I'm seeing it on my system even with the latest versions. Maybe it's a regression. Anyhow, it appears installing pulseaudio-alsa fixed things for me. Note, while that does replace pipewire-alsa (on archlinux), it doesn't replace the whole of pipewire (which I need for LDAC connectivity to my Sony headphones). It seems to just be some config files. I managed to mess up various packages when experimenting, but the solution seems to be to keep your pipewire packages and just install pulseaudio-alsa and immediately reboot the system; simply restarting the pipewire service, or resolve doesn't seem to work.

In summary, install pulseaudio-alsa, then reboot. Resolve's audio player lag issue should go away.

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], Danyyy3l, Mads Johansen, panos_mts, pperquin, Robert - NCSU, Username and 309 guests