This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to get SPS PPS and SEI frames in same buffer from encoder



Hello all,


We are using DVRRDK_03.50.00.05 on DM816x series processor. Ours is a streaming/recording application where we use Ti's H264 encoder. We are calling Venc_getBitstreamBuffer function to read frames from encoder and we are getting frames in following sequence,

SPS 0x00 0x00 0x00 0x01 0x27 <Data>

PPS 0x00 0x00 0x00 0x01 0x28 <Data>

SEI 0x00 0x00 0x00 0x01 0x06 <Data>

I frame 0x00 0x00 0x00 0x01 0x25 <Data>

...

All three SPS, PPS and SEI frames are having same timestamp but they are coming in separate Venc_getBitstreamBuffer function calls.

My question :

Is it possible to have these SPS, PPS and SEI frames in same buffer (i.e. in one single Venc_getBitstreamBuffer function call) like this,

0x00 0x00 0x00 0x01 0x27 <Data> PPS 0x00 0x00 0x00 0x01 0x28 <Data> SEI 0x00 0x00 0x00 0x01 0x06 <Data>

I frame 0x00 0x00 0x00 0x01 0x25 <Data>

...

Thanks in advance..


  • Hello Shabbir,

     

    I wonder about this too.  I ended up doing it manually and overwriting the header that the encoder gave me with my own.

     

    Brandy

  • This is really weird.

    The way the encoder link is written such a behavior is impossible because for each frame only a single output buffer is passed in the encoder codec processCall which is then forwarded to ipcBitsLink.

    - Are the channel numbers the same when you get SPS/PPS/I_frame in separate process calls.

    - If channels numbers are same are the buffer addresses of SPS/PPS/I_Frame physically contiguous.

    - Are you doing interlaced encoding ?

    - Are you doing force I frame ?

    - Pls print the encoder static and dynamic parameters and share the logs.

     

  • Thanks Badri, I double checked the points which you asked and I found that there was some issue in my application which was giving wrong observation. I am getting proper frame sequence SPS......PPS.......SEI.......I_FRAME..... etc.

    Thank you for your support.