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

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

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

AnexoTamanho
Download figure1.png152.57 KB
7 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

This is a duplicate. See response in other post,

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

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

Hi nrson,

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

Regards,
Petter

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

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

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!