Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

UMC - H.264 encoder parameters - IDR interval

yusufbediz
Beginner
1,486 Views
I've tried to encode a h.264 video using the sample application 'video_enc_con' in UMC. I've set the N(# of frames between I frames) and IDR interval parameters to '30 30' and expected that all I frames will be IDR. But in resulting encoded video only the first frame is an IDR frame ?? if I am not wrong, seeking is not possible in this video. Is it a bug ?
0 Kudos
5 Replies
Vladimir_Dudnik
Employee
1,486 Views

Could you please specify what IPP version do you use?

Regards,
Vladimir

0 Kudos
Vladimir_Dudnik
Employee
1,486 Views

For IPP v5.1, according our expert

IDR interval designates a number of I frames between IDR frames. So if you want every I frames to be IDR you need to set the number of IDR frames parameter to 1.

Regards,
Vladimir

0 Kudos
yusufbediz
Beginner
1,486 Views
I've tried with IPP 5.0 UMC 5.0.17. I've downloaded the IPP 5.1 recently. I will try it again. Thanks.
0 Kudos
Vladimir_Dudnik
Employee
1,486 Views

Thanks, please also do not mind to provide us any feedback you have about UMC interface, codec's functionality or performance. It will help us in further improvement of IPP media sample.

Thanks,
Vladimir

0 Kudos
ruskaz
Beginner
1,486 Views
Hi.

using: IPP 5.1 Linux, last samples.

I want use H.264 for video conferencing.
I encode video using H.264 codec from samples (30fps), then wrap rtp and send via network to decoder. All works well while stream not broken;
But some frames can be lost. In this case after a while I receive Segmentation Fault in a method GetFrame of the decoder.
Im shure, that I call decoder's GetFrame with correct MediaData from encoder, just some MediaDatas can be lost.
I think, I can resolve this problem this way: stop decoding when detect that stream is brooken, then wait for next I frame and start decode again - from start of new IDR interval.
But I think param key_frame_controls.idr_interval of H264EncodeParams not works, I can see only 1 I-frame in start of stream. And I found this code in samples in H264Encoder implementation:

Status H264VideoEncoder::EncodePicture(H264_Image &dst)
{
...
switch (m_PicType)
{
case INTRAPIC:
if (m_uFrames_Num == 0 && m_PicParamSet.picture_structure != BOTTOM_FIELD) {
// Right now, only the first INTRAPIC in a sequence is an IDR Frame
ePic_Class = IDR_PIC;
} else {
ePic_Class = REFERENCE_PIC;
}
break;
...
I think it mean that only first frame can be I-frame :)??

If so, I can transmit via network different bitstreams (destroy and create new encoder every N frames), but seems that not good decision. Besides decoder start output pictures only after it have 16 frames inside. I think that will be too many not shown pictures in this case.

Can somebody tell to me how it is possible to construct a videoconference using h.264 or to specify mistakes in my reasonings?

p.s. sorry for my english
0 Kudos
Reply