Vladimir Eremeev <[EMAIL PROTECTED]> added the comment:
1. When capturing the MPEG Transport stream and saving to a MPEG PS
file two elementary streams belonging to the same program, and when
timestamps roll over 33 bits and drop to 0 from near 8,589,938,000
av_write_frame gives an error message "non monotone time stamps" and
doesn't write the read packets to the file.
2. When capturing the MPEG Transport stream and saving to a MPEG PS
file two elementary streams belonging to the same program, and when
timestamps roll over 33 bits I was getting the following timestamps
pkt.pts=8589902202, pkt.dts=8589902202
pkt.pts=8589905802, pkt.dts=8589905802
pkt.pts=8589920202, pkt.dts=8589909402
pkt.pts=8589913002, pkt.dts=8589913002
pkt.pts=8589916602, pkt.dts=8589916602
pkt.pts=8589931002, pkt.dts=8589920202
pkt.pts=8589923802, pkt.dts=8589923802
pkt.pts=8589927402, pkt.dts=8589927402
pkt.pts=7210, pkt.dts=-3590
pkt.pts=10, pkt.dts=10
pkt.pts=3610, pkt.dts=3610
pkt.pts=18010, pkt.dts=7210
pkt.pts=10810, pkt.dts=10810
pkt.pts=14410, pkt.dts=14410
pkt.pts=28810, pkt.dts=18010
pkt.pts=21610, pkt.dts=21610
pkt.pts=25210, pkt.dts=25210
pkt.pts=39610, pkt.dts=28810
There are several elementary streams in the transport stream, these
timestamps are from the same elementary PID, other PIDs are discarded.
These timestamps were received from the av_read_frame() function.
If I leave these timestamps without changes and give them to the
av_write_frame() function, then, at best, it complains about "non-
monotone time stamps" and doesn't write any data after 33-bit rollover.
As timestamps are represented by int64_t variables, upper 31 bits of
them are unused and must be set to 0, therefore there should not be
negative values (such as -3590).
FFmpeg version SVN-r14130, Copyright (c) 2000-2008 Fabrice Bellard, et
al.
configuration: --disable-static --enable-shared --disable-stripping --
cpu=i686 --enable-debug=3 --enable-pthreads --prefix=/usr/
local
libavutil version:
49.6.0
libavcodec version:
51.56.0
libavformat version:
52.13.0
libavdevice version:
52.0.0
built on Jul 8 2008 20:10:55, gcc: 3.4.3 20050227 (Red Hat
3.4.3-22.1)
----------
status: closed -> open
substatus: invalid -> open
title: Inconsistent processing of timestamps by av_read_frame and
av_write_frame -> Inconsistent and incorrect processing of timestamps by
av_read_frame and av_write_frame
______________________________________________________
FFmpeg issue tracker <[EMAIL PROTECTED]>
<https://roundup.mplayerhq.hu/roundup/ffmpeg/issue516>
______________________________________________________