Hi,

Andre wrote:
>> 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.

I am not sure why you are reordering frames... Are you using libavformat 
both for reading and writing frames? If yes, there should be no 
problems, and you should be able to use the input PTS and DTS for the 
output.

In the original email, you wrote that you got the "error, non monotone
timestamps" error. But the "monotone timestamps" check is performed on 
the DTS (not on the PTS), and the DTSs you reported in your email are 
monotonically increasing...

The problem you are seeing seems to be that the mpegts demuxer seems to 
sometime return the same DTS for 2 consecutive frames. I do not think 
this is due to B frames (I've seen even with files that do not contain 
any B frame); it looks more like a bug in the TS demuxer.



                                Luca
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to