Last active
April 29, 2025 21:17
-
-
Save MarkusMaal/8068252292082a375f4f48e261213c77 to your computer and use it in GitHub Desktop.
DaVinci Resolve conversion script for Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| declare -a queue | |
| echo "This script allows you to convert video file(s) so that they work with DaVinci Resolve free in Linux." | |
| while true; do | |
| read -p "DRAG a video file to this window: " filename | |
| filename="${filename//\'/}" | |
| queue+=("$filename") | |
| echo -ne "Convert another video file? [Y/N]" | |
| read -rsn1 val | |
| echo | |
| [ "$val" = "n" ] && break | |
| [ "$val" = "N" ] && break | |
| done | |
| for i in "${queue[@]}"; do | |
| echo $i | |
| ffmpeg -i "${i}" -map 0:v:0 -pix_fmt yuv420p10le -f yuv4mpegpipe -strict -1 - | SvtAv1EncApp -i stdin --preset 6 --keyint 240 --input-depth 10 --crf 30 --rc 0 --passes 1 --film-grain 0 -b infile.ivf | |
| ffmpeg -i infile.ivf -i "${i}" -map 0:v -map 1:a:0 -acodec mp3 -vcodec copy "${i}.converted.mp4" | |
| rm infile.ivf | |
| done | |
| echo "Queue finished" | |
| echo -n "Press any key to quit . . . " | |
| read -rsn1 | |
| echo |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
update: convert to av1/mpeg instead of dnxhd/pcm (reduced filesizes)