Problems with insertion of SEI messages (H.264) into the bitstream

Problems with insertion of SEI messages (H.264) into the bitstream

Portrait de marina_golovkina

Hello,

I try to insert SEI messages (H.264) into the bitstream. I open the output encoded stream with Tektronix MTS4EA Video ES Analyser. But it reports error: End of NAL unit reached while reading RESERVED_SEI_MESSAGE_PAYLOAD_BYTE. I attached screenshot. Below I wrote an example of code as I insert SEI messages. What do I do incorrectly?

mfxSession mfx_session;
mfxIMPL impl = MFX_IMPL_HARDWARE_ANY;
mfxVersion version = {0, 1};
mfxVideoParam mfx_enc_params;
mfxFrameSurface1 pSurface;
mfxSyncPoint EncSyncP;
mfxBitstream mfxBS;

MFXInit(impl, &version, &mfx_session);

// filling of mfx_enc_params structure
mfx_set->mfx.CodecId = MFX_CODEC_AVC;
...

MFXVideoENCODE_Init(mfx_session, &mfx_enc_params);

//initialization of pSurface and mfxBS
...

// SEI message

mfxEncodeCtrl mfxEncCtrl = {0};

unsigned char text[] = "MainConcept";

mfxPayload * p_payload[256];
mfxPayload p;

p.Data = text;
p.BufSize = sizeof(text);
p.NumBit = sizeof(text) * 8;
p.Type = 5; //user_data_unregistered

mfxEncCtrl.Payload = p_payload;
mfxEncCtrl.Payload[0] = &p;
mfxEncCtrl.NumPayload = 1;

MFXVideoENCODE_EncodeFrameAsync(mfx_session, &mfxEncCtrl, pSurface, &mfxBS, &EncSyncP);

//writing encoded data to file...

Thanks,
Marina

Fichier attachéTaille
Téléchargement error.PNG55.46 Ko
3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de Petter Larsson (Intel)

Hi Marina,

Please see the following forum post for how to insert SEI message into H.264 stream.
http://software.intel.com/en-us/forums/showthread.php?t=101849&o=a&s=lr

Hope this helps.
Regards, Petter

Portrait de marina_golovkina

Hi Petter,

Thank you for reply. I corrected my code as in your example. Now SEI messages are inserted without problem.

Best regards,
Marina

Connectez-vous pour laisser un commentaire.