- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a question. I can use IPP sample code to getthe framesone by one from a MPEG2 file. However, if I want togeta specified frame, for example, the 1000th frame, but I don't want to get framesfrom the beginning of thefile.How to do? Please give me a hint. Thanks.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Suppose you can change position in decoded bitstream.
1st way.
Each GOP header contain information about current second and a number of the first frame of the GOP in that second. In display order.
So the number is gop_second*frame_rate + gop_picture.
The number is relative, becausefirst frame can have other than 0 value.
If frame rate is not integer, round it to closest integer.
But not all the streams contain such information in GOP header.
2nd way. For sytem streams.
Use PTS difference and frame_rate. PTS can come not with every frame, but it is possible to get sync. PTS==-1 means that it is absent in current portion of data.
In both cases you should start decoding from the start of containing GOP, or even from previous.
Regards
![](/skins/images/7FC17B7B85029576C25F1E43CE255B51/responsive_peak/images/icon_anonymous_message.png)
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