[FFmpeg-devel] [RFC] mpegts: Provide a monotonic timestamp to the outside world

Joakim Plate elupus at ecce.se
Mon Oct 22 09:40:39 CEST 2012

Harald Axmann <harald.axmann <at> hotmail.com> writes:

> I am using XBMC with PVR extension and came across the issue concerning 
> PCR wraps in TS recordings, as already mentioned by [1] and [2] for 
> example. After some discussion on XBMC's Github page Joakim Plate came 
> up with the idea, to patch all the time stamps directly on demuxing, so 
> that the outside world will see a monotonic time stamp starting at zero 
> [3]. I have implemented this approach and successfully tested it with a 
> couple of recordings. Please see the attached patch, which is also 
> available on Github [4]. It only deals with mpegts, since I have not 
> found any mpegtsraw material for testing.

The problem we are trying to solve is that, its very common for mpegts
recordings to contain one single wrap in them due to recording right
when a channel has this wrap and it happening nightly.

An option to this solution could be to only handle the wrap, and expose
original timestamps before the wrap + larger than normal wrap-point
timestamps after. Since ffmpeg's internal have no problem with somewhat
larger timestamps.


More information about the ffmpeg-devel mailing list