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.

how to encode h265 in lookahead bitrate mode?

XueLou_Ting
Beginner
821 Views

when encoding H264 video, the lookahead rate control method can improve the encoding quality . So I want to encode h265 video file in lookahead mode too.
I don't know how to use the LA mode for h265 encoding. I think the la_ext is the implementation for h265 LA mode., so my command line is :
./sample_multi_transcode -i::h265 input.265 -o::h265 out.hevc -b 3000 -w 1920 -h 1080 -u 4 -lad 100 -la_ext

The result is:

Multi Transcoding Sample Version 8.4.27.

libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
Session 0:
plugin_loader.h :185 [INFO] Plugin was loaded from GUID: { 0x58, 0x8f, 0x11, 0x85, 0xd4, 0x7b, 0x42, 0x96, 0x8d, 0xea, 0x37, 0x7b, 0xb5, 0xd0, 0xdc, 0xb4 } (Intel (R) Media SDK plugin for LA ENC)

[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), EncodePreInit, m_pmfxENC->Query failed at /home/lpb/git_hub/MediaSDK/samples/sample_multi_transcode/src/pipeline_transcode.cpp:461

[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), Init, EncodePreInit failed at /home/lpb/git_hub/MediaSDK/samples/sample_multi_transcode/src/pipeline_transcode.cpp:3721

[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), Init, pThreadPipeline->pPipeline->Init failed at /home/lpb/git_hub/MediaSDK/samples/sample_multi_transcode/src/sample_multi_transcode.cpp:442
plugin_loader.h :211 [INFO] MFXBaseUSER_UnLoad(session=0x0x56331c850c50), sts=0

[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), main, transcode.Init failed at /home/lpb/git_hub/MediaSDK/samples/sample_multi_transcode/src/sample_multi_transcode.cpp:1169

My CPU is i7-6700HQ. API version is 1.28. Libva version is 1.0
So how to encode h265 in lookahead mode? And whether my CPU and the driver version support the h265 LA mode?

0 Kudos
1 Reply
Mark_L_Intel1
Moderator
821 Views

Hi XueLou,

It looks like you were failed on the plugin loading. Are you trying to use external LA or the default LA?

This error line explained:

/home/lpb/git_hub/MediaSDK/samples/sample_multi_transcode/src/sample_multi_transcode.cpp:442
plugin_loader.h :211 [INFO] MFXBaseUSER_UnLoad(session=0x0x56331c850c50), sts=0

This is the actual code:

https://github.com/Intel-Media-SDK/MediaSDK/blob/master/samples/sample_multi_transcode/src/sample_multi_transcode.cpp#L422

https://github.com/Intel-Media-SDK/MediaSDK/blob/master/samples/sample_multi_transcode/src/sample_multi_transcode.cpp#L1169

The document didn't say support HEVC by default but I believe you could pass this error if you use H.264 and without "-la_ext" argument, then try to use HEVC without "-la_ext"

If still not working, please use command "strace ./sample_multi_transcode -i::h265 input.265 -o::h265 out.hevc -b 3000 -w 1920 -h 1080 -u 4 -lad 100 -la_ext" to check why the plugin can not being loaded.

Mark

0 Kudos
Reply