[vlc-devel] [PATCH] mux/avformat: normalize pts and dts in AVPacket

Filip Roséen filip at atch.se
Tue Feb 21 14:59:29 CET 2017


Hi Francois,

On 2017-02-21 14:46, Francois Cartegnie wrote:

> Le 21/02/2017 à 14:35, Filip Roséen a écrit :
> >>
> >> If stream is created late, it should be out of sync then, as the
> >> absolute offset dissapears.
> >>
> >> http://streams.videolan.org/samples/V-codecs/h264/hdtv-interlaced/stz_split_top_bottom_field.ts
> > 
> > The incoming timestamps (as seen by the *muxer*) are not guaranteed to
> > start at any particular offset, which further means that there is no
> > way to know whether a "stream is created late".
> > 
> > All the *muxer* sees is a timestamp, and it will use that as the
> > starting offset for whatever it is muxing. The changes incorporated in
> > the proposed patch does not change any behavior in terms of
> > discontinuity, nor *"late starts"*.
> 
> It -does- change, and everything is out of sync.
> 
> [00007f519c003228] avformat mux error: could not write frame (pts:
> 12237718190, dts: 12237684823) (pkt pts: 22772, dts: 22806)
> [matroska @ 0x7f519c005c40] pts 22856 < dts 22922 in stream 2
> [00007f519c003228] avformat mux error: could not write frame (pts:
> 12237801612, dts: 12237801612) (pkt pts: 22856, dts: 22922)
> [matroska @ 0x7f519c005c40] pts 22872 < dts 22939 in stream 2
> [00007f519c003228] avformat mux error: could not write frame (pts:
> [........]

I am unable to reproduce the above behavior (which I reckon happens
when transcoding the mentioned `ts` with the *avformat muxer*). Can
you elaborate on how you came to the described log?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170221/b866aca0/attachment.html>


More information about the vlc-devel mailing list