0

I'm trying to use ffmpeg to encode a series of rendered images with a soundtrack. When we import that video into Premiere the audio seems to be 1/2 frame early. When we import that same video in Resolve the sync seems fine.

To see this, run this script and import "output.mov" into Premiere and Resolve:

#!/bin/sh

# generate 3 seconds worth of test charts at 24fps

ffmpeg -y \
       -f lavfi -i testsrc=duration=3:size=1280x720:rate=24 \
       -f image2 "%03d.png"

# generate a 1kHz tone with duration 1/24s    

duration=$(awk "BEGIN {print 1/24}")
ffmpeg -y \
       -f lavfi -i sine=frequency=1000:duration=$duration \
       -t 3.0 -acodec aac 1000hz.m4a

# combine the images and the audio, and offset the audio exactly 2 seconds

ffmpeg -y \
       -f image2 -framerate 24.0 -i "%03d.png" \
       -itsoffset 2.0 -i 1000hz.m4a \
       -vcodec libx264 -pix_fmt yuv420p -crf 20 output.mov

The result is supposed to be a 3 second video clip with the audio pop exactly on the 49th frame. And when our assistant editor loads the clip into Davinci Resolve the pop occurs exactly on frame 49 as we expect. In Premiere the pop is a half frame early.

So in ffmpeg I can add a 1/2 frame offset to the audio. That video will import in Premiere with the audio on frame 49, and in Resolve I'm told the audio is a half frame late. Is there a way to encode this video so that the audio is properly synced for Premiere AND Resolve?

1 Answer 1

0

Resolve has settings to compensate for playback audio latency. If there’s a difference between the sync offset you’re seeing while editing and the rendered output, you need to adjust the delay amount.

1
  • Fair enough, and the assistant editor can probably nudge the audio in Premiere also. I’m going to keep this question open, though, because I’m curious if I can generate a single file that loads properly without those adjustments.
    – Gonewest
    Oct 16, 2021 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.