Skip to content

Instantly share code, notes, and snippets.

@alopatindev
Created March 2, 2024 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alopatindev/88666dfb1106682073b28b33952b1234 to your computer and use it in GitHub Desktop.
Save alopatindev/88666dfb1106682073b28b33952b1234 to your computer and use it in GitHub Desktop.

https://wiki.archlinux.org/title/DaVinci_Resolve

$ ffmpeg -i input.mp4 -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a pcm_s16le -f mov output.mov

This causes a/v desync for me (15 min video). In case if anybody runs into the same, here's the solution:

ffmpeg -threads 16 -fflags '+genpts+igndts' -i input.mp4 -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -af 'aresample=async=1,asetpts=PTS-STARTPTS' -c:a pcm_s16le -f mov output.mov

The downside is that it makes sound in DaVinci Resolve preview choppy, but it's fine after final rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment