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.

h264 problem in GetVideoParam

Ser_C_
Beginner
450 Views


hi,

I'm trying to test the h264 encoder with ffmpeg muxer using the latest Media SDK 2013R2  in software mode and cannot get it to work, the encoding process is ok but the file created cannot be played.

First thing, the GetVideoParam function returns MFX_ERR_NONE but the buffers contents are not filled and bufffers size value not change:


            mfxU8 SPSBuffer[MAXSPSPPSBUFFERSIZE];
            mfxU8 PPSBuffer[MAXSPSPPSBUFFERSIZE];
   
            mfxExtCodingOptionSPSPPS m_extSPSPPS;
            MSDK_ZERO_MEMORY(m_extSPSPPS);
            m_extSPSPPS.Header.BufferId = MFX_EXTBUFF_CODING_OPTION_SPSPPS;
            m_extSPSPPS.Header.BufferSz = sizeof(mfxExtCodingOptionSPSPPS);
            m_extSPSPPS.PPSBuffer        = PPSBuffer;
            m_extSPSPPS.SPSBuffer        = SPSBuffer;
            m_extSPSPPS.PPSBufSize        = MAXSPSPPSBUFFERSIZE;
            m_extSPSPPS.SPSBufSize        = MAXSPSPPSBUFFERSIZE;
   
            mfxEncParams.ExtParam = new mfxExtBuffer *[1];
            mfxEncParams.ExtParam[0] = (mfxExtBuffer*)&m_extSPSPPS;
            mfxEncParams.NumExtParam = 1;
   
            // Retrieve encoder parameters incl. sequence header
            sts = mfxENC.GetVideoParam(&mfxEncParams);
--------------------- >
        returns sts= MFX_ERR_NONE
       
        m_extSPSPPS.SPSBuffer          contents untouched
        m_extSPSPPS.SPSBufSize      MAXSPSPPSBUFFERSIZE
        m_extSPSPPS.PPSBuffer        contents untouched
        m_extSPSPPS.PPSBufSize      MAXSPSPPSBUFFERSIZE



could be that the problem?


thanks in advance


Attached all the code.

0 Kudos
4 Replies
Petter_L_Intel
Employee
450 Views

Hi,

I quickly tried SW processing using the Media SDK ffmpeg tutorial sample using Media SDK 2013 R2 and it fetching SPS/PPS worked just fine. But, to be honest, that integration tutorial sample and some of the other tutorial samples have not been extensively tested using Media SDK SW codecs. Main focus is on HW accelerated usages.There may be issues lurking.

Are you getting any error or warning status codes returned from the Media SDK API calls?

And it looks like your extended buffer initialization may be wrong. Try the following instead.
mfxExtBuffer* encExtParams[1];
encExtParams[0] = (mfxExtBuffer *)&extSPSPPS;
mfxEncParams.ExtParam = &encExtParams[0];
mfxEncParams.NumExtParam = 1;

Regards,
Petter 

0 Kudos
Ser_C_
Beginner
450 Views

Hi,

thanks for the answer, It's working now, solved by copying libmfxsw32.dll from 2013 sdk to program folder.

Searching from where it could be loading the dll apart from sdk install path, I found it was loading an old libmfxsw32.dll 1.0.1.21 from 2010 in C:\Windows\SysWOW64 probably installed by some bad software.

Thanks

Ser

0 Kudos
rshal2
New Contributor II
450 Views

Hello,

How is m_extSPSPPS.PPSBuffer contents gets initialized.

On observing the example it seems that it is missing.

Regards,

Ran

0 Kudos
Sravanthi_K_Intel
450 Views

Hello Ran - This is a very old thread and much has improved in MSDK since. Could you kindly start a new thread with detailed question based on the suggested format please? - https://software.intel.com/en-us/forums/intel-media-sdk/topic/531083

We can take a look at it then.

0 Kudos
Reply