How can I remove the AUD, SEI, and PPS headers after encoding?

How can I remove the AUD, SEI, and PPS headers after encoding?

nrson's picture

Hi,

I have a analysis H264 bitstreams after encoding. There are other headers(AUD, PPS, SEI) as like figure 1.

I want to remove the other headers because the encoded bitstream is transfered to other client.

How do I delete it?

Thanks in advance,

nrson

AttachmentSize
Download figure1.png152.57 KB
7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Petter Larsson (Intel)'s picture

This is a duplicate. See response in other post,

nrson's picture

Hi, Petter
I rewrite my source your advices, but output stream is as like previouse status.
My source is as following:
mfxStatus CEncodingPipeline::InitMfxEncParams(sInputParams *pInParams)
{
m_mfxExtCodingOption.NalHrdConformance = MFX_CODINGOPTION_OFF;
m_mfxExtCodingOption.PicTimingSEI = MFX_CODINGOPTION_OFF;
m_mfxExtCodingOption.AUDelimiter = MFX_CODINGOPTION_OFF;

m_mfxEncParams.mfx.CodecId = pInParams->CodecId;
m_mfxEncParams.mfx.TargetUsage = pInParams->nTargetUsage; // trade-off between quality and speed
m_mfxEncParams.mfx.TargetKbps = pInParams->nBitRate; // in Kbps
m_mfxEncParams.mfx.RateControlMethod = MFX_RATECONTROL_CBR;
ConvertFrameRate(pInParams->dFrameRate, &m_mfxEncParams.mfx.FrameInfo.FrameRateExtN, &m_mfxEncParams.mfx.FrameInfo.FrameRateExtD);
m_mfxEncParams.mfx.EncodedOrder = 0; // binary flag, 0 signals encoder to take frames in display order

...................

return MFX_ERR_NONE;
}
Where is the problems?
Best regareds,
nrson

nrson's picture

Hi, Petter
I rewrite my source your advices, but output stream is as like previouse status.
My source is as following:
mfxStatus CEncodingPipeline::InitMfxEncParams(sInputParams *pInParams)
{
m_mfxExtCodingOption.NalHrdConformance = MFX_CODINGOPTION_OFF;
m_mfxExtCodingOption.PicTimingSEI = MFX_CODINGOPTION_OFF;
m_mfxExtCodingOption.AUDelimiter = MFX_CODINGOPTION_OFF;

m_mfxEncParams.mfx.CodecId = pInParams->CodecId;
m_mfxEncParams.mfx.TargetUsage = pInParams->nTargetUsage; // trade-off between quality and speed
m_mfxEncParams.mfx.TargetKbps = pInParams->nBitRate; // in Kbps
m_mfxEncParams.mfx.RateControlMethod = MFX_RATECONTROL_CBR;
ConvertFrameRate(pInParams->dFrameRate, &m_mfxEncParams.mfx.FrameInfo.FrameRateExtN, &m_mfxEncParams.mfx.FrameInfo.FrameRateExtD);
m_mfxEncParams.mfx.EncodedOrder = 0; // binary flag, 0 signals encoder to take frames in display order

...................

return MFX_ERR_NONE;
}
Where are the problems?
Best regareds,
nrson

Petter Larsson (Intel)'s picture

Hi nrson,

can you explain what NAL types you see in the generated stream? Are you using HW or SW encode?

Regards,
Petter

nrson's picture

Hi Petter,
I want to encode using HW, and NAL type's sequence are SPS->PPS->I->P->P...->SPS->PPS->I->P->-P->....
That is to say, GOP's interval is 10 not using B frame and SPS and PPS before I frame are inserted.
Tnanks in advance,
nrson

Petter Larsson (Intel)'s picture

Hi nrson,

as explained in previous post (see duplicate) PPS and AUD does get inserted when encoding using HW. This is known HW limitation. If you do not want to have these part of the stream you have to remove them manually.

To generate I-P-P..... GOP pattern then set GopRefDist=1. GopPicSize is used to control GOP size and IdrInterval is used to configure frequency of key frames.

Regards,
Petter

Login to leave a comment.