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.

HEVC plugin transcoding very slow

VASILY_V_
Beginner
1,346 Views

Hi, 

recently I've started experimenting with HEVC plugin, which provide software HEVC decoder and encoder implementations. I've install Professional edition, recompile kernel with included patchset, and run test:

~# /opt/intel/mediasdk/samples/_bin/x64/sample_multi_transcode -i::h265 /opt/intel/mediasdk/samples/_bin/content/test_stream.265 -o::h265 test_out.h265 -sw -pe 2fca99749fdb49aeb121a5b63ef568f7
Multi Transcoding Sample Version 8.2.25.982

plugin_loader.h :172 [INFO] Plugin was loaded from GUID: { 0x15, 0xdd, 0x93, 0x68, 0x25, 0xad, 0x47, 0x5e, 0xa3, 0x4e, 0x35, 0xf3, 0xf5, 0x42, 0x17, 0xa6 } (Intel (R) Media SDK plugin for HEVC DECODE)
plugin_loader.h :172 [INFO] Plugin was loaded from GUID: { 0x2f, 0xca, 0x99, 0x74, 0x9f, 0xdb, 0x49, 0xae, 0xb1, 0x21, 0xa5, 0xb6, 0x3e, 0xf5, 0x68, 0xf7 } (Intel (R) Media SDK plugin for HEVC ENCODE)
Pipeline surfaces number (DecPool): 12
MFX SOFTWARE Session 0 API ver 1.25 parameters: 
Input  video: HEVC
Output video: HEVC

Session 0 was NOT joined with other sessions

Transcoding started
..
Transcoding finished

Common transcoding time is 1.46311 sec
-------------------------------------------------------------------------------
*** session 0 PASSED (MFX_ERR_NONE) 1.46296 sec, 101 frames
-i::h265 /opt/intel/mediasdk/samples/_bin/content/test_stream.265 -o::h265 test_out.h265 -sw -pe 2fca99749fdb49aeb121a5b63ef568f7 

-------------------------------------------------------------------------------

The test PASSED
plugin_loader.h :198 [INFO] MFXBaseUSER_UnLoad(session=0x0x55fc454a0bc0), sts=0
plugin_loader.h :198 [INFO] MFXBaseUSER_UnLoad(session=0x0x55fc454a0bc0), sts=0

 

So everything looks fine, and I've started to transcode my own files. And first sample gives me dramatically poor results: transcoding speed was getting around 3-5 fps.

~# /opt/intel/mediasdk/samples/_bin/x64/sample_multi_transcode -sw -i::h265 in.h265 -o::h265 out.h265 -b 18000 -MaxKbps 20000 -n 100 -u veryfast
Multi Transcoding Sample Version 8.2.25.982

plugin_loader.h :172 [INFO] Plugin was loaded from GUID: { 0x15, 0xdd, 0x93, 0x68, 0x25, 0xad, 0x47, 0x5e, 0xa3, 0x4e, 0x35, 0xf3, 0xf5, 0x42, 0x17, 0xa6 } (Intel (R) Media SDK plugin for HEVC DECODE)
plugin_loader.h :172 [INFO] Plugin was loaded from GUID: { 0x2f, 0xca, 0x99, 0x74, 0x9f, 0xdb, 0x49, 0xae, 0xb1, 0x21, 0xa5, 0xb6, 0x3e, 0xf5, 0x68, 0xf7 } (Intel (R) Media SDK plugin for HEVC ENCODE)
Pipeline surfaces number (DecPool): 15
MFX SOFTWARE Session 0 API ver 1.25 parameters: 
Input  video: HEVC
Output video: HEVC

Session 0 was NOT joined with other sessions

Transcoding started
.
Transcoding finished

Common transcoding time is 19.0315 sec
-------------------------------------------------------------------------------
*** session 0 PASSED (MFX_ERR_NONE) 19.0313 sec, 100 frames
-sw -i::h265 in.h265 -o::h265 out.h265 -b 18000 -MaxKbps 20000 -n 100 -u veryfast 

-------------------------------------------------------------------------------

The test PASSED
plugin_loader.h :198 [INFO] MFXBaseUSER_UnLoad(session=0x0x55d8bc1d6b50), sts=0
plugin_loader.h :198 [INFO] MFXBaseUSER_UnLoad(session=0x0x55d8bc1d6b50), sts=0

I think I have some error with my setup, but could not figured out where. On same CPU libx265 gives me around 25-30 fps ultrafast 3840x2160 transcoding, and I expect to get at least close results from MediaSDK HEVC plugin.

The input file: https://yadi.sk/d/mUOCI9shJQI68Q

I've tried to convert size to 1920x1080, convert input HEVC to 8 bits, select 25 fps input files, forcibly select chroma mode, direct select GUID of plugin. Also notice that I use only software implementation, without HW acceleration and CPU without quicksync support, but as I understand it should be fine.

My system: ubuntu 16.04.5, kernel 4.4.111 with patchset, MediaSDK 2018R1 Professional Edition for Linux.

Could you please help? 

0 Kudos
4 Replies
VASILY_V_
Beginner
1,346 Views

Is there anything I need to provide for helping with debug?

0 Kudos
Mark_L_Intel1
Moderator
1,346 Views

Hi Vasily,

Sorry for the delayed response. I am assuming you have provide me with the reproducer and I will see if I can reproduce it.

At the same time, could you try the same test but without patching the kernel? Since Ubuntu 16.04.5, all the latest kernels have been fully supported by Intel so you don't have to do patches.

Mark

0 Kudos
VASILY_V_
Beginner
1,346 Views

Hi, Mark

Could you please be more specific about which kernel version should I use?

Also as you see I'm using 2018 R1, which depend on 4.4.111 kernel version. Do you suggest to use here kernel like 4.14.20 as used in 2018R2 release?

0 Kudos
Mark_L_Intel1
Moderator
1,346 Views

Sorry if my answer confused you.

For Ubuntu 16.04, you can just use the default kernel. We support 4.14.16 or newer.

https://software.intel.com/en-us/articles/build-and-debug-open-source-media-stack

Mark

0 Kudos
Reply