ffmpeg -framerate 29.97 -hwaccel cuda -start_number 200000 -i %06d.tif -c:v libx264 -preset veryslow -tune film -profile:v high -pix_fmt yuv420p -level 4.1 -crf 17 -r 29.97 -threads 2 -frames:v 5000 ade-20000_202559_ArtemisHQ_tiff.mkv
I’m using the above command line to join together TIFF files that have been produced by a video enhance program, to produce a final video. I’m using a 2080ti GPU on Linux ver 20. Ffmpeg has been compiled using an online tutorial for Nvidia video encoding. My problem is that running the command with the -hwaccel cuda doesn’t increase the speed of processing much. I have used NVTOP to check that the GPU is being used. It shows 1% GPU and 200% CPU. Without the -hwaccel cuda NVTOP obviously doesn’t show any data.
Yes, it is to speed up the encoding. As the second answer says, maybe it can't be done because of the frequent read of files. I will still try the replacement with the nvenc command.
Thanks for all three prompt replies.
So I tried:
ffmpeg -framerate 29.97 -hwaccel cuda -start_number 200000 -i %06d.tif -c:v h264_nvenc -preset veryslow -tune film -profile:v high -pix_fmt yuv420p -level 4.1 -crf 17 -r 29.97 -threads 2 -frames:v 5000 ade-20000_202559_ArtemisHQ_tiff.mkv I got:
Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (ade-20000_202559_ArtemisHQ_tiff.mkv) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. Codec AVOption tune (Tune the encoding to a specific scenario) specified for output file #0 (ade-20000_202559_ArtemisHQ_tiff.mkv) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. When the command ran I got:
[h264_nvenc @ 0x559577472b40] [Eval @ 0x7ffd3759cc40] Undefined constant or missing '(' in 'veryslow' [h264_nvenc @ 0x559577472b40] Unable to parse option value "veryslow" [h264_nvenc @ 0x559577472b40] Error setting option preset to value veryslow. Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed!
So I tried:
ffmpeg -framerate 29.97 -hwaccel cuda -start_number 200000 -i \%06d.tif -c:v h264_nvenc -preset veryslow -tune film -profile:v high -pix_fmt yuv420p -level 4.1 -crf 17 -r 29.97 -threads 2 -frames:v 5000 ade-20000_202559_ArtemisHQ_tiff.mkv
I got:
Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (ade-20000_202559_ArtemisHQ_tiff.mkv) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Codec AVOption tune (Tune the encoding to a specific scenario) specified for output file #0 (ade-20000_202559_ArtemisHQ_tiff.mkv) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
When the command ran I got:
[h264_nvenc @ 0x559577472b40] [Eval @ 0x7ffd3759cc40] Undefined constant or missing '(' in 'veryslow'
[h264_nvenc @ 0x559577472b40] Unable to parse option value "veryslow"
[h264_nvenc @ 0x559577472b40] Error setting option preset to value veryslow.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
Could this be where I've placed the command? You'll probably guess that I am not good at Linux or ffmpeg.
-c:v libx264
with something along the lines of-c:v h264_nvenc
or one of the other hardware accelerated codecs in order to use your GPU.libx264
is a CPU encoder not a GPU one.ffmpeg -h encoder=h264_nvenc
.