[Libav-user] calc next audio pts value

Patrick Fischer pfischer at como.com
Mon Aug 5 11:09:05 CEST 2013


Hello

 
I would like to understand how i can calc the diff to the next PTS Value.

Im processing a dvb stream. To be in sync i detect if a frame is missing and add a dummy frame.

For video frames a can use this formula:

 
 (1/fps) * 90000 * NUMBER_OF_THE_FRAME

example:

(1 / 30) * 90000 * 1 = 3600

 
i can't find out the formula for audio pts values.

if i print out the diff to the last audio pts it is 

    Stream #0:2[0x66](deu): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s

diff to last pts 2880

 
If i take an other video:

    Stream #0:1[0x1412](deu): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s

diff to last pts 2160

 
Can anybody give me a hint?

 
Best Regards

Patrick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130805/b11b0a7c/attachment.html>


More information about the Libav-user mailing list