Vladimir Eremeev wrote:
>
>
>
> Paul Kelly-3 wrote:
>>
>>>> My impression is that PTS in the stream is somehow reflects the real
>>>> time
>>>> and is reset to 0 once a day.
>>
>> Why do you not fix the timestamps before passing them to
>> av_write_frame()?
>> Perhaps you could check for the point when it resets to 0, and then add
>> an
>> offset to every timestamp that occurs after that.
>>
>
I think, the better solution would be set PTS to 0 at the beginning of
recording.
However, I still cannot find if FFmpeg allows this.
Vladimir Eremeev wrote:
>
> Looks like I've found better solution.
> input->flags|=AVFMT_NOFILE|AVFMT_FLAG_IGNIDX|AVFMT_NOTIMESTAMPS;
> input->flags&=~AVFMT_FLAG_GENPTS;
>
> The latter flag AVFMT_FLAG_GENPTS occurs only in the code, solves the
> question whether to quit or to save a frame, if this non-monotonity
> occurs. I think it is designed specially for such situations.
>
>
I am wrong, that's incorrect.
The code in FFmpeg looks like this:
if(ret<0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
Therefore, assigning this flag to input AVFormatContext is wrong.
Will try and see if changing oformat flags will do the job.
--
View this message in context:
http://www.nabble.com/WHY--Why-frames-with-PTS-%3E-8%2C589%2C930%2C000-get-stuck-in-the-input-buffer-%21-tp17664697p18008692.html
Sent from the libav-users mailing list archive at Nabble.com.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user