video-encodingscreensharinglibvpx

How to get encode packet immediately with vp9


When i build the libvpx examples project "simple_encoder", I found a phenomenon,the demo need to call the vpx_codec_encode function 23 times to get the first frame of data.This is unacceptable in my needs, how can I fix this? My current project core functionality is screen sharing,and i try to use vp9 as the video encoder.


Solution

  • Just set the "g_lag_in_frames=0" we can get data immediately