[MPlayer-users] Strange play time in recorded transport stream

Etienne Buira etienne.buira.lists at free.fr
Wed Mar 30 09:04:52 CEST 2011


On Wed, Mar 30, 2011 at 12:40:44AM +0200, Ingo Brückl wrote:
> Etienne Buira wrote on Tue, 29 Mar 2011 21:13:25 +0200:
> 
> > AFAIK the format does not allow to reliably know where it is in the
> > stream (designed to be continuous, and as the timestamps cannot grow
> > forever, there is a need to cycle them). The only information close to
> > reality I get (at least with -demuxer lavf) is the stream length.
> 
> ffprobe gives the correct length but an absurd start:
> 
>   Duration: 00:01:06.08, start: 28856.320756, bitrate: 3868 kb/s
> 
> If the start value is a random timestamp, then something like
> 
>   new_timestamp = timestamp - start;
>   if (new_timestamp < 0) new_timestap += max_cycle_value + 1;
> 
> should solve the problem (and work with start: 0.000000 as well).
> 
> Ingo

As Oliver told you, it is not a working solution.

However, if you want to recreate the timestamps, you can use ffmpeg:
ffmpeg -i input.ts -acodec copy -vcodec copy -fflags +genpts output.ts


More information about the MPlayer-users mailing list