Community
cancel
Showing results for 
Search instead for 
Did you mean: 
mosheshi
Beginner
105 Views

Does an mpeg 2 video stream have to be sequence align?

Hi,

I am new to IPP and UMC modules. I am trying the simple player application. If I stream an input of mpeg 2 video only, does the file (in my case) have to be sequence header align, starting with 0x000001b3?

When I tryunaligned file, I don't get output.

Also, I understand that the first frame must be handles first to the decoder. Can I after that call the GetFrame function with chunk of N bytes data?

Thanks.

Moshe

0 Kudos
3 Replies
Leonid_K_Intel
Employee
105 Views

Hi Moshe,

What do you mean by "have to be sequence header align"? Mpeg2 video has to have video_sequence_header anyway and the header starts with header start code.

Memory alignment is not required.

Decoder should be initialized first, and during initialization it processes sequence header. Then with each GetFrame call it processes one frame. Input portion of data must contain the whole encoded frame. If there are more than one frame, only one is decoded. Pointer in the input buffer is moved by the number of consumed bytes, which is the length of the decoded frame. You can read docs for more details.

Regards,

Leonid

mosheshi
Beginner
105 Views

Thanks for your answer.

What I mean by sequence align is that if I am capturing data from network, live broadcasting for example, I can't be sure that the stream will have the seq start code at the begining (actually, quite sure it won't!), so I have to look for the next seq start code to start parsing the data.

The question is, do I have to do it myself before calling the umc modules or is this case supported by splitter object.

Thanks.

Moshe

Leonid_K_Intel
Employee
105 Views

Hi Moshe,

If you use umc splitter you wouldn't have this problem. It looks for sequence header and start the output with it.

If you use only decoder, it looks for sequence header in Init() call. If the header was not found Init() returns error and you need to provide next portion of data and so on.

Leonid

Reply