- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm using MPEG2/MPEG4/H264 encoders and was wondering if there is a way to determine what type an encoded frame is. Right now, GetFrame( in, out ) will return me an opaque MediaSample, but doesn't tell me if it is a P/I/B frame. Specifically, I would like to know if it is a start of a gop or more generally a frame that allows immediate correct playing when read.
Thanks,
Tilman.
I'm using MPEG2/MPEG4/H264 encoders and was wondering if there is a way to determine what type an encoded frame is. Right now, GetFrame( in, out ) will return me an opaque MediaSample, but doesn't tell me if it is a P/I/B frame. Specifically, I would like to know if it is a start of a gop or more generally a frame that allows immediate correct playing when read.
Thanks,
Tilman.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tilman,
there is answer from our experts:
We have m_FrameType in MediaData class, and SetFrameType/GetFrameType methods. MPEG2 and MPEG4 encoders set it. Other dont. It is not a problem to scan output data for start codes and picture type.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir,
I've looked at the definitions of UMC::MediaData and it is quite abstract and does not contain any information of the type of frame. UMC::VideoData on the other hand has the m_FrameType member. In my code, I assemble a UMC_VideoData block with a full YUV picture in it, then pass it down to the encoder by calling
encoder.GetFrame( my_vid_data_in, media_data_out )
This returns a media data which I would like to understand what it is. However parsing the block and looking for a start code in the bitstream seems somewhat cumbersome, since the encoder just created that bitstream and therefore the information is there.
Would it make sense to have a provision in the encoder that (maybe even polymorphically) allows me to get to the frame type?
Regards,
Tilman.
p.s. I'm using 5.1, but checked in 5.2 and that doesn't seem to have changed there.
I've looked at the definitions of UMC::MediaData and it is quite abstract and does not contain any information of the type of frame. UMC::VideoData on the other hand has the m_FrameType member. In my code, I assemble a UMC_VideoData block with a full YUV picture in it, then pass it down to the encoder by calling
encoder.GetFrame( my_vid_data_in, media_data_out )
This returns a media data which I would like to understand what it is. However parsing the block and looking for a start code in the bitstream seems somewhat cumbersome, since the encoder just created that bitstream and therefore the information is there.
Would it make sense to have a provision in the encoder that (maybe even polymorphically) allows me to get to the frame type?
Regards,
Tilman.
p.s. I'm using 5.1, but checked in 5.2 and that doesn't seem to have changed there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tilman,
sorry, it was my mistake. Our expert meant the current code base, not IPP 5.2 beta. That's correct, in IPP 5.2 beta there were no support for frame type information in MediaData. This will be added into the next release of IPP media sample. So, for IPP 5.1 and IPP 5.2 beta you need to parse bitstream to detect frame type.
Regards,
Vladimir
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page