[FFmpeg-devel] How to get PCR (Programe Clock Reference)value from TS file ?

Thomas Parmegiani thomasp
Wed Aug 8 14:29:57 CEST 2007


> -----Message d'origine-----
> De : ffmpeg-devel-bounces at mplayerhq.hu
> [mailto:ffmpeg-devel-bounces at mplayerhq.hu]De la part de Michael
> Niedermayer
> Envoye : mercredi 8 aout 2007 14:11
> A : FFmpeg development discussions and patches
> Objet : Re: [FFmpeg-devel] How to get PCR (Programe Clock
> Reference)value from TS file ?
>
>
> Hi
>
> On Wed, Aug 08, 2007 at 12:33:28PM +0200, Thomas Parmegiani wrote:
> > Hi all !
> >
> > Can anyone tell me how to retrieve PCR value from TS file ?
> > I noticed this value seems to be filled in "cur_pcr" variable from
> > MpegTSContext structure but this structure is not declared in
> .h file. Is
> > there any other about how I can get this value or should I need to move
> > strcut to mpegts.h ?
> > What is the unit of the variable cur_pcr ? I tested with a TS @
> 25fps and
> > after each call of av_read_frame the different values of cur_pcr are
> > alternatively 14,19,14,19,...
> > One last question : I would like this value has to be read from
> TS file and
> > not calculated from ffmpeg is it that ffmpeg does ?
> >
> > Can anyone help me ?
>
> why do want to know the PCR value?

On my application I need to demux a MPEG2 transport stream received from
satellite then send audio decoded frames and video MPEG2 frames to a
hardware device wich will display the A/V frames. This hardware device needs
the PCR value to accelerate or slow down the frame display process in order
to prevent from buffer overflow or empty buffer. All I need to do is to give
the PCR information value (Which should be a part of computation field
(correct me if I am wrong)) to my hardware device.

Thanks in advance.

Thomas.P





More information about the ffmpeg-devel mailing list