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.
3072 Discussions

Adding an FFMPEG front-end to the sample_multi_transcode sample causes massive slowdown

Shannon
Beginner
528 Views

I use the Linux Server Intel Media SDK.

I ported the windows version example of the sample_decode using ffmpeg to linux and found that both the ffmpeg input version and the regular version ran in about the same amount of ticks. The demuxing didn't seem to have much impact at all.

I then used the code from the ffmpeg decode sample to add the ffmpeg input to the sample_multi_transcode sample code. I went from processing ~10k frames of SD in 15 seconds to ~10k frames of SD in 212 seconds. After adding some benchmarking I have determined the exact bottleneck in the source code. Unfortunately the function call is not source code that I have access to and it doesn't explain well what the code is trying to do.

The function is in pipeline_transcode.cpp. CTranscodingPipeline::PutBS(). The line that is running so much slower is:

sts = m_pmfxSession->SyncOperation(pBitstreamEx->Syncp, MSDK_WAIT_INTERVAL);

What I would like to know is:

1) What does this function do?

2) Why would it run drastically slower with a different file reader feeding it?

0 Kudos
3 Replies
Petter_L_Intel
Employee
528 Views

Hi Shannon,

I see no clear reasons for slowed down execution due to added container splitter Media SDK component pipeline. 

Some potential culprits may be related to incompatible stream hear layout (e.g. annexB), your FFmpeg reader wait state handling, or somehow fallback on SW codec instead of HW codec execution.

Not sure what sample you are referring to in the context of FFmpeg integration. The primary sample we have, showcasing this kind of integration is part of the Media SDK tutorial:

http://software.intel.com/en-us/articles/intel-media-sdk-tutorial
http://software.intel.com/en-us/articles/intel-media-sdk-tutorial-simple-6-transcode-opaque-async-ffmpeg

The SyncOperation() call locks execution until a frame is ready (processed by decode, VPP or Encode, or a combination).

Regards,
Petter

0 Kudos
Shannon
Beginner
528 Views

Do you have that tutorial intel-media-sdk-tutorial-simple-6-transcode-opaque-async-ffmpeg for Linux? I found the windows version and started porting it though its not working quite yet.

The code I was using before I got from the samples directory in the SDK (MSDK/5.0.036-HSW_R3/l_MSDK/samples) and I had modified the sample sample_multi_transcode to have an FFMPEG input instead of the file reader.

0 Kudos
Petter_L_Intel
Employee
528 Views

Hi Shannon,

We do not yet have a port for the Media SDK Tutorial samples for Linux. 

The plan is for a new release of the tutorial shortly, including support for Linux. We will notify the community via this forum when it's available.

Regards,
Petter

0 Kudos
Reply