Skip to content

Instantly share code, notes, and snippets.

@heavyengineer
Created November 17, 2019 12:20
Show Gist options
  • Save heavyengineer/4a9ff8d3c51053f2daa26c69b3dc3f1b to your computer and use it in GitHub Desktop.
Save heavyengineer/4a9ff8d3c51053f2daa26c69b3dc3f1b to your computer and use it in GitHub Desktop.
Transcode oneplus3 4k video to DNXHR format compatible with davinci resolve 16
#!/bin/bash
# if an argument is supplied, use that as the filename
if test ! -z "$1"
then
ffmpeg -i ${1} -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv420p -c:a pcm_s16le ${1}.mov
# else, get all the MP4s
else
for f in *.MP4
do
ffmpeg -i ${f} -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv420p -c:a pcm_s16le ${f}.mov
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment