Skip to content

Instantly share code, notes, and snippets.

@metaphore
Created November 2, 2022 17:52
Show Gist options
  • Save metaphore/d3d7049cf8ffc840a712875afa9af8a3 to your computer and use it in GitHub Desktop.
Save metaphore/d3d7049cf8ffc840a712875afa9af8a3 to your computer and use it in GitHub Desktop.
Davinci Resolve Linux video transcode script.
#!/bin/bash
ABS_FILEPATH=$(realpath "$1")
ABS_DIR=$(dirname "$ABS_FILEPATH")
FILENAME=$(basename -- "$1")
EXTENSION="${FILENAME##*.}"
FILENAME="${FILENAME%.*}"
# echo "Filename is $FILENAME and the EXTENSION is $EXTENSION. Dir is $ABS_DIR"
OUTPUT="$ABS_DIR/${FILENAME}_remuxed.mov"
# echo "Output file is: $OUTPUT"
ffmpeg -i "$1" -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a pcm_s16le "$OUTPUT"
@metaphore
Copy link
Author

A little utility that uses FFMPEG to transcode any video to a Davinci Resolve friendly decoder format (on Linux).
The output video is named "{orig_name}_remuxed.mov" and is placed next to the original file.

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