Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
23 Views

UMC codecs and H264 in QuickTime

hello,

I have a H264 decoder based on UMC codecs, and it works fine with avc in AVI files. But when I try to decode AVC samples demuxed from a .mov file, I get errors : GetInfo() doesn't return UMC_OK and my samples aren't decoded. My stream is in AVC's main profile and the init phase of the decoder returns UMC_OK.

Is there any difference between AVC in MOV and in AVI, so that the decoder needs a special initialization ?

Thanks in advance

Aymeric

0 Kudos
9 Replies
Highlighted
23 Views

Hi Aymetric,

AVI and MOV actually is different formats, you need to use appropriate demuxer (splitter). I think that MOV is similar to MP4 format, so you can try to use MP4Splitter from UMC.

Regards,
Vladimir

0 Kudos
Highlighted
Beginner
23 Views

hi Vladimir,

Thanks for your reply.
Actually I think the problem doesn't come from the demuxer : I have written a demuxer for mov files which correctly extract frames - I validated it with frames encoded in DV or MJpeg and decoded with UMC codecs.

Codecs like mpeg-4 or H264 don't work, and that's why I was wondering if the encoding in these codecs was the sasme in AVI and MOV files.

regards,

Aymeric
0 Kudos
Highlighted
23 Views

Hi Aymeric,

If you compress those streams with the same compression parameters there should not be difference in encoder bitstream (doesn't matter what container do you use)

Regards,
Vladimir

0 Kudos
Highlighted
Beginner
23 Views

Hi,

I found the reason : decoders need some metadata to decompresse frames - which is called "extra-data" in ffmpeg, and these data are not contained in every frame in MOV as they are in AVI container. So we just have to get these data once, and add them in every frame before decoding.

Regards,

Aymeric

0 Kudos
Highlighted
Beginner
23 Views

A little old thread., but I have the same problem, could you explain where should this 'extra-data' go. Do you just add it before(after?) compressed data and call GetFrame() ?
0 Kudos
Highlighted
Beginner
23 Views

The data/nal units you're looking for are called the Sequence Parameter sets (SPS) and Picture Parameter Sets (PPS). To Initialize the Intel H.264 Decoder, you need to feed it the sps, pps, and first i-frame first. Then you're good to go.
0 Kudos
Highlighted
Beginner
23 Views

Thanks for answer.
I still can't get it to work.
Do I just put SPS/PPS in buffer and after this first i-frame and call Init() ?
Or fist call Init() with just SPS/PPS ?
Now I take SPS,PPS append first i-frame and call Init().
Init() return UMC_OK but GetFrame() always UMC_ERR_NOT_ENOUGH_DATA.
Do SPS/PPS need to be in some specific format (need some headers) ?
0 Kudos
Highlighted
Beginner
23 Views

I usually Init with no extra data p_data field. Then I feed the frames to the decoder like: GetFrame(mySps,NULL);
GetFrame(myPPS,NULL);
GetFrame(myIFrame,NULL);

You may need to handle specially for access units too.

Dan
0 Kudos
Highlighted
Beginner
23 Views

Hi Dan,

Could you help me a bit?

I have a quicktime movie, containing a H264 stream (the MP4Splitter recognizes it). But i'm unable to figure out where to get the SPS, PPS an IFrame info you talk about.

Regards,

Matthijs ter Woord

Ps, i'm relatively new to IPP in general.

0 Kudos