Hi Mark, On Tue, Jan 27, 2009 at 4:25 AM, Mark Kenna <[email protected]> wrote: > I'm wondering the best way to handle B-Frames within the MPEG4 stream > when you don't have access to the PTS or DTS value's (check previous posts). > Currently I am thinking of just reading the GOP which is sent as [I P B > B B P B B B] and reordering the frames into [I B B B P B B B P] and then > displaying them and carrying on... > > What I would like to know is: > a) is it a good idea to handle them this way? (probably not)
No. > b) is there any way at all to get libav* to handle the realignment of > the GOP for me? Or at least be able to help in some way? As I keep telling you, the GOP rearrangement is done based on values in AVCodecContext. These are normally (MPEG system streams) filled in by the AVParser, and my rough guess is that your values are wrong, leading to the wrong ordering during decoding and possibly frame loss. Look at the very least at the parsing implementation (libavcodec/mpegvideo_parse.c) to see which values I mean in AVCodecContext, and set them correctly before starting decoding. Ronald _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
