Skip to content

Instantly share code, notes, and snippets.

@heavyengineer
Last active October 21, 2022 13:21
Show Gist options
  • Save heavyengineer/d2299c4ee44e926e0a1d351f1ae7091c to your computer and use it in GitHub Desktop.
Save heavyengineer/d2299c4ee44e926e0a1d351f1ae7091c to your computer and use it in GitHub Desktop.
transcode gopro mp4 to DNxHR yuv422 with 10 bit color, fix wide angle lens and pcm wav sound for davinci resolve 16 editing
#!/bin/bash
for f in *.MP4
do
#ffmpeg -i ${f} -c:v dnxhd -vf lenscorrection=k2=0.006:k1=-0.18 -profile:v dnxhr_hqx -pix_fmt yuv422p10le -c:a pcm_s16le ${f}.mov
~/bin/ffmpeg -i ${f} -c:v dnxhd -profile:v dnxhr_hqx -pix_fmt yuv422p10le -vf "lenscorrection=cx=0.5:cy=0.5:k1=-0.227:k2=-0.022" -c:a pcm_s16le ${dest}/${io}.lens_corrected.mov
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment