Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.
3061 Discussions

How to choose proper initial_pool_size for FFmpeg qsv encoder


I am testing HEVC encoding with 

    i9-12900K (UHD Graphics 770 iGPU) WHQL Certified


I used FFmpeg hevc_qsv and it require initialized HWFramesContext

since it does not support dynamic pool size

i have to set pool size with hw_frames_ctx->initial_pool_size = ...


In libavcodec/qsv.c qsv_frame_alloc has proper code that using NumFrameSuggested

and registered to mfxFrameAllocator::Alloc but this function is never called


So how do i select proper pool size for QSV encoding with FFmpeg?

and i cant figure out why mfxFrameAllocator::Alloc is not called

(documentation said it is called twice when MFXVideoENCODE_Init is called)

(It seems that tutorial also call mfxFrameAllocator::Alloc manually...)



Labels (1)
0 Kudos
0 Replies