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
Announcements
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.
3060 Discussions

D3DTexture2D import encode crashed with MFX_ERR_LOCK_MEMORY error

Max_Gud
New Contributor I
531 Views

OS: Windows 11 23 H2
Video driver: gfx_win_101.5330, gfx_win_101.5194, gfx_win_101.5186
Video card: Arc A380

I am developing a plugin for OBS Studio using libvpl for real-time coding. With the release of libvpl 2.10, textures for encoding were added and supported, it works, but I ran into a problem, after a few minutes the encoding process was interrupted with the error MFX_ERR_LOCK_MEMORY from the EncodeFrameAsync function. Further attempts to start encoding are immediately interrupted with the MFX_ERR_LOCK_MEMORY error until the application is restarted.

A step-by-step process that I'm doing:

1. A pool of intermediate textures is being created
2. Copying an external texture to pool
3. Importing textures from a pool to libvpl
4. Encode
The error occurs at stage 4. There are no errors in the first 3 stages


The source code of the application can be found at the links below:

- The function of allocating a pool of intermediate textures - https://github.com/ma3uk/obs-qsv-onevpl/blob/edf5864eec4a3965dc660e48b4641bd9404daa7f/obs-qsvonevpl/obs-qsv-onevpl-encoder-internal.cpp#L1266

- The internal function of texture allocation - https://github.com/ma3uk/obs-qsv-onevpl/blob/edf5864eec4a3965dc660e48b4641bd9404daa7f/obs-qsvonevpl/helpers/common_directx11.cpp#L131

- The function of copying an external texture to a texture pool - https://github.com/ma3uk/obs-qsv-onevpl/blob/edf5864eec4a3965dc660e48b4641bd9404daa7f/obs-qsvonevpl/helpers/common_directx11.cpp#L273

- The function of importing textures into libvpl and encoding - https://github.com/ma3uk/obs-qsv-onevpl/blob/edf5864eec4a3965dc660e48b4641bd9404daa7f/obs-qsvonevpl/obs-qsv-onevpl-encoder-internal.cpp#L1607

It is also worth clarifying that in my case the error occurs when encoding the 65537 frame.

0 Kudos
1 Reply
Max_Gud
New Contributor I
481 Views

Addition: when testing on the integrate graphic UHD 770 video card, the video encoding process is interrupted with an error MFX_ERR_DEVICE_FAILED

0 Kudos
Reply