<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In my experience, x264 is very fast and you may not be able to beat it at low quality.  That said, there are a lot of possibilities for why it may be slow.  Look at:  <a href="https://devblogs.nvidia.com/nvidia-ffmpeg-transcoding-guide/" target="_blank">https://devblogs.nvidia.com/nvidia-ffmpeg-transcoding-guide/</a> which will give you some tips for minimizing PCIe transfers to keep it fast.<br>Cheers.</blockquote><div><br></div><div>Thanks! I read through the nvidia docs. It seems that I need to pass in the "hwaccel: cuvid" option in order to keep the raw frame in GPU memory. Do you have any idea how to do this in Libav (C)? I tried following <a href="https://stackoverflow.com/questions/5985273/using-ffmpeg-hwaccel-from-c?fbclid=IwAR0bI8NuMoc29Kw_tCwGQVogXAsG4liAqYSw6hftOZ2n8H5jn-JIV6RVdko">this Stackoverflow post,</a> but av_hwaccel_next() kept returning NULL for a pixel format of AV_PIX_FMT_YUV420P and a codec of "h264_nvenc." I also see that av_hwaccel_next is deprecated. Do you have any suggestions?</div><div><br></div><div>Thanks!<br></div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Philippe</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 17, 2020 at 12:07 AM Jodon Karlik <<a href="mailto:jodonk@gmail.com">jodonk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 16, 2020 at 5:28 PM Philippe Noël <<a href="mailto:philippe_noel@college.harvard.edu" target="_blank">philippe_noel@college.harvard.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,<br></div><div><br></div><div>I was using libx264 to encode a video file using libav from a C file and switched to nvenc_h264 and now the encode is very slow. It appears nvenc_h264 does not have a "ultrafast" setting.</div><div><br></div><div>With nvenc_h264 I am using preset "llhq" and tune "zerolatency". Am I using the wrong settings?</div><div><br></div><div>Cheers,</div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Philippe<br></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote><div><br></div><div>
In my experience, x264 is very fast and you may not be able to beat it at low quality.  

That said, there are a lot of possibilities for why it may be slow.  Look at:  <a href="https://devblogs.nvidia.com/nvidia-ffmpeg-transcoding-guide/" target="_blank">https://devblogs.nvidia.com/nvidia-ffmpeg-transcoding-guide/</a> which will give you some tips for minimizing PCIe transfers to keep it fast.<br></div><div><br></div><div>Cheers.<br> </div></div></div>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote></div>