<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><span class="gmail-im" style="color:rgb(80,0,80)"><div><div>> 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. </div><div>> I noticed in the <a href="https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/hw_decode.c" target="_blank">example you sent me</a> 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? ></div></div><div><br></div></span><div>Look at this example, it has the missing info that you require. <a href="https://github.com/FFmpeg/FFmpeg/blob/a0ac49e38ee1d1011c394d7be67d0f08b2281526/fftools/ffmpeg_cuvid.c" target="_blank">https://github.com/FFmpeg/FFmpeg/blob/a0ac49e38ee1d1011c394d7be67d0f08b2281526/fftools/ffmpeg_cuvid.c</a></div><div>argv[1] should be replaced by "cuda", yes.</div></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br>Regards<br>Strahinja Radman</div></div>