Igor Vinograd wrote:I'm trying to work with some 1600x900 25fps H.264 video. The video edits great but when delivering 1920x1080 59.94fps H.264 video the encoding is ultra slow.
- Code: Select all
if not exist newfilescap md newfilescap
for %%A in (*.MP4) do ffmpeg -i "%%A" -r 60000/1001 -s 1920x1080 -vcodec libx264 -acodec pcm_s16le -ar 48000 -ac 2 "newfilescap\%%~nA.mov"
pause
That command converts your source footage to h264, which is a highly compressed format and Resolve does not like that.
I think you might have missed my reply to your previous thread (
viewtopic.php?f=21&t=56675#p324966 ), as you don't specify compression settings to libx264.
Igor Vinograd wrote:Using the above script and FFMPEG I re encoded the video into something that is closer to the delivery format to speed up delivery. The problem now is that when editing the video, after a few changes it will show "Media Offline".
After doing some more reading the best format for Resolve is DNxHD. I'm trying to balance editing ease and delivery encoding speed. I'm having difficulty locating or constructing a command for FFMPEG to give usable video if any video at all.
What FFMPEG command do i need to get best DNxHD results for Resolve or what is the best way to re encode the video?
I don't think you have completely understood your dilemma:
The best way to explain is to use Porters Value Chain: You start with
Input, then do some
Processing, then
Output (and a bunch more irrelevant theory). The tree parts are separate problems with their own challenges:
The
Input problem is where you select what would be best for editing, in this case you use dnxhd (or mpeg4 or ...). To solve this problem I would convert to mpeg (as explained earlier), then do the edits.
The
Processing problem is the actual editing, something a little connected to input (in this case with h264 making editing slow) as a highly compressed format will require more CPU power to uncompress into something Resolve can work with. Choosing a lightly compressed codec will help here.
The
Output speed is 90 to 95% dependent on the codec you select. Choosing h.264 will make the
delivery slower than mpeg4 (although per this forum not recommended to output in either format. The best course of action would be to output to dnxhd/dnxhr 444 / grass valley HQX, then do the actual compression with ffmpeg.)
Depending on your space/time constraints
slow,
slower or
placebo would be the best preset to use. (Please have in mind that placebo is extremely slow, in the order of 2 fps)
- Code: Select all
for %%a in ("*.mov") do timer ffmpeg -i "%%a" -c:v libx264 -preset PRESET_NAME_HERE -c:a aac -ac 2 -b:a 320k "%%~na-placebo.mp4"
Resolve also have a transcode function: See chapter 21 in the manual
Davinci Resolve Studio 20 build 49, Windows 11, Ultra 7 265k, Nvidia 5070 TI, 576.80 Studio