[Libav-user] Nvenc_H264 very slow compared to Libx264

Strahinja Radman dr.strashni at gmail.com
Sun Jan 19 08:56:22 EET 2020


> 1. Would you mind elaborating on how to create a hardware frames context?
I found this example on how to do it with VAAPI. Should I just copy the
set_hwframe_ctx() function? What should I change the pix_fmt to for nvenc?
2.
> I noticed in the example you sent me
<https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/hw_decode.c> they
call av_hwdevice_find_type_by_name(argv[1]). Do I need to do this as
well/should I replace argv[1] by "cuda" since I want to do nvenc? >

Look at this example, it has the missing info that you require.
https://github.com/FFmpeg/FFmpeg/blob/a0ac49e38ee1d1011c394d7be67d0f08b2281526/fftools/ffmpeg_cuvid.c
argv[1] should be replaced by "cuda", yes.

-- 

Regards
Strahinja Radman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200119/25ad5dc4/attachment.html>


More information about the Libav-user mailing list