i have a video file with H.265, and i want to transcode it into H.264 in a Nvidia T4 vm, here is my command
[Attachment 72840 - Click to enlarge]
ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i UPL_MmrXRhwoub.mp4 -c:v h264_nvenc output.mp4
but i got a error like this:
[hevc @ 0x5567877726c0] Skipping NAL unit 62
[hevc @ 0x5567876e2c00] Skipping NAL unit 62
[hevc @ 0x5567876f3040] Skipping NAL unit 62
[h264_nvenc @ 0x5567869ba480] Provided device doesn't support required NVENC features
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
does anyone who know how to solve this problem?
+ Reply to Thread
Results 1 to 19 of 19
-
-
Try
ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i UPL_MmrXRhwoub.mp4 -c:v h264_nvenc -c:a copy -dn output.mp4 -
But NVEnc is not CUDA... NVidia suggest something like this https://developer.nvidia.com/blog/turing-h264-video-encoding-speed-and-quality/
I will be not surprised if vm prevent to use NVEnc by ffmpeg. -
Last edited by ProWo; 2nd Aug 2023 at 10:08.
-
If all you want to do is encode using the built in Nvidia encoding chip. all you need is:
ffmpeg -i input -c:v h264_nvenc -profile high444p -pixel_format yuv444p -preset default output.mp4
This is an example. you can leave out -profile high444p -pixel_format yuv444p doe 8-bit 420 encoding.
The -hwaccel cuda -hwaccel_output_format cuda is for hardware accelerated decoding of the source, this is useful if you have a slower cpu and the source format can be accelerated by nvdec.
For the sake of simplicity, i recommend you let ffmpeg decode the way it sees fit. -
i work with this command:
ffmpeg -loglevel verbose -hwaccel cuvid -hwaccel_output_format cuda -i input.mp4 -vf format=yuv420p -c:v h264_nvenc output.mp4
but the speed is too slow, just 1.6x, it's not normal, my CUDA version is 12.2, ffmpeg version is 4.2.7-0ubuntu0.1 -
-
-
-
i test the nvidia test command ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4, also has this problem
test command is from here
also from https://trac.ffmpeg.org/wiki/HWAccelIntro#CUDANVENCNVDEC i see full transcode command is
ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input -c:v h264_nvenc -preset slow output
and this is also errorLast edited by slick zheng; 2nd Aug 2023 at 21:53.
-
NVidia for NVEnc propose this:
High Quality: -c:v h264_nvenc -preset medium -b:v BITRATE -bufsize BITRATE*2 -profile:v high -bf 3 -b_ref_mode 2 -temporal-aq 1 -rc-lookahead 20 -vsync 0
Once again - verify if your ffmpeg build support NVEnc - try thisffmpeg -h encoder=h264_nvenc >h264_nvenc.txtffmpeg -h decoder=hevc_cuvid >hevc_cuvid.txt -
i tested two command.
1: ./ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i UPL_1vKBpdd4iX.mp4 -c:a copy -c:v h264_nvenc -b:v 5M -vf scale_cuda=format=yuv420p output2.mp4
2: ./ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i UPL_1vKBpdd4iX.mp4 -c:a copy -c:v h264_nvenc -b:v 5M -vf output2.mp4
1 is work, 2 will display the error message, i wan't to know why nvenc encoder require scale_cuda filterLast edited by slick zheng; 4th Aug 2023 at 00:37.
-
try adding either -preset hq or preset p4 after your input file and see if it'll work - https://www.reddit.com/r/ffmpeg/comments/juvioh/ffmpeg_error_provide_device_doesnt_support/
Last edited by october262; 4th Aug 2023 at 00:54.
Similar Threads
-
Intel QSV VS Nvidia CUDA
By BlurayHD in forum Newbie / General discussionsReplies: 34Last Post: 18th Oct 2020, 03:26 -
GPU Accelerated AV Converter multi-formats for nVidia CUDA Hardware.
By sev7en in forum Newbie / General discussionsReplies: 0Last Post: 21st Oct 2019, 02:29 -
Nvidia h.265 hevc lossless
By qo4on in forum Video ConversionReplies: 30Last Post: 11th Apr 2019, 07:45 -
period for video convertion from h.264 to h.265 nvidia 2080
By empleat in forum Video ConversionReplies: 2Last Post: 7th Mar 2019, 10:12 -
nVidia CUDA no good for Prores 422 decoding?
By KiDy in forum ComputerReplies: 3Last Post: 15th Oct 2018, 11:46