Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Rūdolfs_B_
Beginner
51 Views

NAL unit types produced by the H264 encoder

Hi,

I'm trying to use the Intel Media SDK to create a H264 stream and pack it into RTP and playback with gstreamer, so far so good, and a lot of answers on this forum have helped me, currently I'm running into the following issues and it seems I need some clearance:

1) The Annex B format is the only bitstream format produced by Intel Media SDK right? It is just a little inconvenient to run through the bitstream looking for 0x00 0x00 0x00 0x01.

2) How to disable NAL's with type 9 (access unit delimiter unit)? As far as I understand I don't need this in the RTP stream, at least I haven't seen real life H264 over RTP streams sending them. I tried passing mfxExtCodingOption structure like this:

mfxExtCodingOption EncodingOptions;
memset(&EncodingOptions, 0, sizeof(EncodingOptions))
EncodingOptions.Header.BufferId = MFX_EXTBUFF_CODING_OPTION;
EncodingOptions.Header.BufferSz = sizeof(EncodingOptions);
EncodingOptions.AUDelimiter = MFX_CODINGOPTION_OFF;

but the encoder initialization always returns that this is unsupported.

3) During encdoing i get onl sps pps and sei units, is that normal? Shouldn't i get some coded slice frames? I've done a little a output from my program that list the frame flags and found NAL units in the bitstream. Can you tell me if this is expected behaivor? If so maybe there is an issue in gstreamer, because it seems to be throwing a lot of errors.

[6.5.2014 23:2:52.319]: Bitstream generated, frame type: MFX_FRAMETYPE_I|MFX_FRAMETYPE_REF|MFX_FRAMETYPE_IDR
[6.5.2014 23:2:52.320]: NAL unit with, type: 9, size: 2
[6.5.2014 23:2:52.322]: NAL unit with, type: 7, size: 39
[6.5.2014 23:2:52.323]: NAL unit with, type: 8, size: 4
[6.5.2014 23:2:52.324]: NAL unit with, type: 6, size: 3926
...
[6.5.2014 23:2:52.443]: Bitstream generated, frame type: MFX_FRAMETYPE_P|MFX_FRAMETYPE_REF
[6.5.2014 23:2:52.446]: NAL unit with, type: 9, size: 2
[6.5.2014 23:2:52.449]: NAL unit with, type: 8, size: 4
[6.5.2014 23:2:52.451]: NAL unit with, type: 6, size: 23
...
[6.5.2014 23:2:52.913]: Bitstream generated, frame type: MFX_FRAMETYPE_P|MFX_FRAMETYPE_REF
[6.5.2014 23:2:52.916]: NAL unit with, type: 9, size: 2
[6.5.2014 23:2:52.919]: NAL unit with, type: 8, size: 4
[6.5.2014 23:2:52.925]: NAL unit with, type: 6, size: 303
...
[6.5.2014 23:2:52.976]: Bitstream generated, frame type: MFX_FRAMETYPE_P|MFX_FRAMETYPE_REF
[6.5.2014 23:2:52.980]: NAL unit with, type: 9, size: 2
[6.5.2014 23:2:52.983]: NAL unit with, type: 8, size: 4
[6.5.2014 23:2:52.986]: NAL unit with, type: 6, size: 122
...
[6.5.2014 23:2:53.4]: Bitstream generated, frame type: MFX_FRAMETYPE_P|MFX_FRAMETYPE_REF
[6.5.2014 23:2:53.6]: NAL unit with, type: 9, size: 2
[6.5.2014 23:2:53.9]: NAL unit with, type: 8, size: 4
[6.5.2014 23:2:53.10]: NAL unit with, type: 6, size: 94
...
[6.5.2014 23:2:53.48]: Bitstream generated, frame type: MFX_FRAMETYPE_P|MFX_FRAMETYPE_REF
[6.5.2014 23:2:53.48]: NAL unit with, type: 9, size: 2
[6.5.2014 23:2:53.50]: NAL unit with, type: 8, size: 4
[6.5.2014 23:2:53.52]: NAL unit with, type: 6, size: 118
...
[6.5.2014 23:2:53.90]: Bitstream generated, frame type: MFX_FRAMETYPE_P|MFX_FRAMETYPE_REF
[6.5.2014 23:2:53.92]: NAL unit with, type: 9, size: 2
[6.5.2014 23:2:53.93]: NAL unit with, type: 8, size: 4
[6.5.2014 23:2:53.95]: NAL unit with, type: 6, size: 102
...
[6.5.2014 23:2:53.152]: Bitstream generated, frame type: MFX_FRAMETYPE_P|MFX_FRAMETYPE_REF
[6.5.2014 23:2:53.158]: NAL unit with, type: 9, size: 2
[6.5.2014 23:2:53.162]: NAL unit with, type: 8, size: 4
[6.5.2014 23:2:53.165]: NAL unit with, type: 6, size: 144
...
[6.5.2014 23:2:53.187]: Bitstream generated, frame type: MFX_FRAMETYPE_P|MFX_FRAMETYPE_REF
[6.5.2014 23:2:53.191]: NAL unit with, type: 9, size: 2
[6.5.2014 23:2:53.195]: NAL unit with, type: 8, size: 4
[6.5.2014 23:2:53.198]: NAL unit with, type: 6, size: 101
 
From the flags it seems ok, since I get an I frame and following P frames but (and since I'm not that close to H264 I could be mistaken) is it ok that i have only SEI and PPS units in the P frames?

 

0 Kudos
0 Replies
Reply