<div dir="ltr"><div><div><div><div>Hi<br><br></div><div>Not sure if this is the place to post regarding an issue with hevc_vaapi, but since i have absolutely no other headway anywhere and this is driving me crazy, posting it here.<br></div><div><br></div>There is a abnormal behavior when encoding using hevc_vaapi, and has been posted on <cite><a href="https://trac.ffmpeg.org/ticket/5821" target="_blank">https://trac.ffmpeg.org/<wbr>ticket/5821</a></cite><span class="gmail-m_4573500989054910358gmail-_cD">, i have been trying to look for an answer for the same all over the net and have not been able to understand it.<br><br></span></div><span class="gmail-m_4573500989054910358gmail-_cD">Can somebody please have a look at this and point me in the right direction please.<br><br></span></div><div><span class="gmail-m_4573500989054910358gmail-_cD">The summary of the bug from trac is <br><br></span><br><p>
Summary of the bug:<br>
How to reproduce:<br>
</p>
<pre class="gmail-m_4573500989054910358gmail-wiki">ffmpeg -vaapi_device /dev/dri/renderD128 -i x264-8bit-560K.mp4 -vf 'format=nv12,hwupload' -c:v <span class="gmail-m_4573500989054910358gmail-searchword0">hevc_vaapi</span> o.mp4

ffmpeg built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609
</pre><p>
uname -a<br>
</p>
<pre class="gmail-m_4573500989054910358gmail-wiki">Linux trivita-ThinkPad-T460 4.8.0-040800rc3-generic #201608212032 SMP Mon Aug 22 00:34:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
</pre><p>
vainfo<br>
</p>
<pre class="gmail-m_4573500989054910358gmail-wiki">libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/<wbr>i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.1)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 1.7.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseli<wbr>ne:      VAEntrypointVLD
      VAProfileH264ConstrainedBaseli<wbr>ne:      VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseli<wbr>ne:      VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
</pre><p>
no problem using h264_vaapi<br>
no problem hardware decoding hevc<br>
no problem using software encoding libx265<br>
</p>

the whole encoding process runs perfectly smooth, no warnings or errors.
 but the resulting video has problem. like frames go back and forth from
 time to time. i call it '<span class="gmail-m_4573500989054910358gmail-searchword1">jerky</span>'.</div><div><span class="gmail-m_4573500989054910358gmail-_cD"><br></span></div><span class="gmail-m_4573500989054910358gmail-_cD">Thanks<div class="gmail-yj6qo gmail-ajU"><div id="gmail-:2kx" class="gmail-ajR" tabindex="0"><img class="gmail-ajT" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"></div></div><span class="gmail-HOEnZb gmail-adL"><font color="#888888"><br></font></span></span></div><span class="gmail-HOEnZb gmail-adL"><font color="#888888"><span class="gmail-m_4573500989054910358gmail-_cD">Mani</span></font></span></div>