Hi @litemotiv
As I said I would I am posting a reply back.
Unfortunately, as I am using the free version of resolve there is no easy way to really do this easily as the video most certainly has to be re encoded for the freeware version of Resolve.
That being said, the script can still be used it just has to be modified slightly to make use of the DNxHD codec.
I am just waiting for a file that needs to be encoded to see what the size is going to be. Once done and when I am satisfied I will edit this post with the relevant info as to how to do this in terminal and for batch converting.
For now this is all.
Regards, C
EDIT
Please make sure you understand HOW this code works before using it.
This file will take how many ever .mp4 files you have on your drive or inside the folder that you run the bash from and it will convert them to:
.mp4 with pcm16 audio for use with:
DaVinci Resolve STUDIO
or
DNxHD .mov for for use with:
Davinci Resolve FREE
You can change the Bit rate setting but along with this YOU MUST set the correct pixel format
The ffmpeg encoder can not do higher than 1440p
All bit rates and pixel formats are listed at the bottom for quick lookup. (2024 ytd)
I run Nobara 40 (GNOME) and have built this bash on that system I do not know on what other distro’s this will run.
Bash File For
Batch video convertor…
This bash must be run from within the terminal and the folder or root directory in which the .mp4 videos are that you want converted.
Please make sure to set a valid path for the OUTDIR command for the videos to be rendered to…
Please make sure that you have the ffmpeg encoder installed and active on your distro before creating or running this bash.
From terminal, Navigate to your:
cd /usr/local/bin
Inside that folder run:
sudo nano -e
Enter your password when prompted
Make sure to UNCOMMENT, (remove the #) from the line you want active for your version of Resolve.
COPY THE TEXT BELOW TO YOUR EDITOR AND PASTE IT IN THERE
# Save inside as: /usr/local/bin/file_name_of_your_liking.sh
# From terminal, navigate to the source folder / directory where the videos
# are that you want to convert, and then run: The_file_name_you_created.sh
#
#!/bin/bash
#Remember to cofigure the OUTDIR below
OUTDIR='/home/cgpc/Store/';
# !!!! FOR DAVINCI RESOLVE STUDIO!!!!!
# Uncomment the line below for the paid version of DaVinci Resolve
# for i in *.mp4; do ffmpeg -i "$i" -c:v copy -c:a pcm_s16be "${OUTDIR}${i}.mov";done
# This will not alter your video file but will re-code your audio to 16bit PCM (It is really relly fast)
# !!!!!! FOR DAVICNI RESOLVE FREE
# You can set the size of the file by the quality you want, Available quality is quantified in Mbps
# eg. (-b:v 36M) is = to 36Mbps
# ALSO,please note the PIXEL FORMAT this will also need to be set in accordance
# eg. (-pix_fmt yuv422p) Both of these will render for 1080p60
# Make sure that the above are in order and your videos will be encoded in a batch format
# Please note that these files for the free version will be bigger by an order of magnitude
# eg. Using a source file of 4.9GB with the current 36M bitrate upon being converted was 64.6GB
# Uncomment the line below for the Free version of DaVinci Resolve
# for i in *.mp4; do ffmpeg -i "$i" -c:v dnxhd -b:v 36M -pix_fmt yuv422p -c:a pcm_s16be "${OUTDIR}${i}.mov";done
# Video Parameters Valid For DNxHD profiles:
# Frame size: 1920x1080p; bitrate: 175Mbps; pixel format: yuv422p10
# Frame size: 1920x1080p; bitrate: 185Mbps; pixel format: yuv422p10
# Frame size: 1920x1080p; bitrate: 365Mbps; pixel format: yuv422p10
# Frame size: 1920x1080p; bitrate: 440Mbps; pixel format: yuv422p10
# Frame size: 1920x1080p; bitrate: 115Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 120Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 145Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 240Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 290Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 175Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 185Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 220Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 365Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 440Mbps; pixel format: yuv422p
# Frame size: 1920x1080i; bitrate: 220Mbps; pixel format: yuv422p10
# Frame size: 1920x1080i; bitrate: 120Mbps; pixel format: yuv422p
# Frame size: 1920x1080i; bitrate: 145Mbps; pixel format: yuv422p
# Frame size: 1920x1080i; bitrate: 185Mbps; pixel format: yuv422p
# Frame size: 1920x1080i; bitrate: 220Mbps; pixel format: yuv422p
# Frame size: 1440x1080i; bitrate: 120Mbps; pixel format: yuv422p
# Frame size: 1440x1080i; bitrate: 145Mbps; pixel format: yuv422p
# Frame size: 1280x720p; bitrate: 90Mbps; pixel format: yuv422p10
# Frame size: 1280x720p; bitrate: 180Mbps; pixel format: yuv422p10
# Frame size: 1280x720p; bitrate: 220Mbps; pixel format: yuv422p10
# Frame size: 1280x720p; bitrate: 90Mbps; pixel format: yuv422p
# Frame size: 1280x720p; bitrate: 110Mbps; pixel format: yuv422p
# Frame size: 1280x720p; bitrate: 180Mbps; pixel format: yuv422p
# Frame size: 1280x720p; bitrate: 220Mbps; pixel format: yuv422p
# Frame size: 1280x720p; bitrate: 60Mbps; pixel format: yuv422p
# Frame size: 1280x720p; bitrate: 75Mbps; pixel format: yuv422p
# Frame size: 1280x720p; bitrate: 120Mbps; pixel format: yuv422p
# Frame size: 1280x720p; bitrate: 145Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 36Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 45Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 75Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 90Mbps; pixel format: yuv422p
# Frame size: 1920x1080p; bitrate: 350Mbps; pixel format: yuv444p10, gbrp10
# Frame size: 1920x1080p; bitrate: 390Mbps; pixel format: yuv444p10, gbrp10
# Frame size: 1920x1080p; bitrate: 440Mbps; pixel format: yuv444p10, gbrp10
# Frame size: 1920x1080p; bitrate: 730Mbps; pixel format: yuv444p10, gbrp10
# Frame size: 1920x1080p; bitrate: 880Mbps; pixel format: yuv444p10, gbrp10
# Frame size: 960x720p; bitrate: 42Mbps; pixel format: yuv422p
# Frame size: 960x720p; bitrate: 60Mbps; pixel format: yuv422p
# Frame size: 960x720p; bitrate: 75Mbps; pixel format: yuv422p
# Frame size: 960x720p; bitrate: 115Mbps; pixel format: yuv422p
# Frame size: 1440x1080p; bitrate: 63Mbps; pixel format: yuv422p
# Frame size: 1440x1080p; bitrate: 84Mbps; pixel format: yuv422p
# Frame size: 1440x1080p; bitrate: 100Mbps; pixel format: yuv422p
# Frame size: 1440x1080p; bitrate: 110Mbps; pixel format: yuv422p
# Frame size: 1440x1080i; bitrate: 80Mbps; pixel format: yuv422p
# Frame size: 1440x1080i; bitrate: 90Mbps; pixel format: yuv422p
# Frame size: 1440x1080i; bitrate: 100Mbps; pixel format: yuv422p
# Frame size: 1440x1080i; bitrate: 110Mbps; pixel format: yuv422p
Once done, write (ctrl+O), name eg.(conv_audio.sh) and exit (ctrl+X) the bash file.
A few todo’s:
This part of the code needs to be changed to where you want your extracted videos to be put:
OUTDIR=‘/where/your/render_disk_is_located/’;
eg.OUTDIR=‘/home/cgpc/Store/’;
The bash file you created, will need to be made executable.
Do this by running the following command from within the /usr/local/bin location:
sudo chmod +x conv_audio.sh
Enter in your password if prompted and press enter.