> Andre schrieb: >> MtTracer schrieb: >>> Andre schrieb: >> I solved this by simply saving the packet's pts if got_picture_ptr is 0 >> and for every following frame I check if savedPTS<packetPTS. In this >> case I use the saved pts instead and the packet's pts will be saved then. > > I'll give it a try. Thank you for the quick and exhaustive answer!
I tried to reorder the frames by their pts values to achieve the correct presentation order. This worked in a sense that av_interleaved_write_frame doesn't complain any more about non monotone timestamps. Yet, the resulting file is broken. Video and audio are synchronised but the b-frames aren't at their right places. Playing with ffplay I get the following errors repeatedly (truncated): [h264 @ 0xb7c8e310]B picture before any references, skipping [h264 @ 0xb7c8e310]decode_slice_header error [h264 @ 0xb7c8e310]B picture before any references, skipping [h264 @ 0xb7c8e310]decode_slice_header error [h264 @ 0xb7c8e310]B picture before any references, skipping [h264 @ 0xb7c8e310]decode_slice_header error Every skipped b-frame results in grey areas in the displayed image. Any ideas? Regards, Andre _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
