[Libav-user] Conversion of PTS from MP4 to MPEG2-TS

Andrey Utkin andrey.krieger.utkin at gmail.com
Mon Aug 27 16:05:31 CEST 2012


2012/8/27 Wagner Patriota <wagner.patriota at gmail.com>:
> What is the formula for this conversion? (probably with exception for the
> first PTS, that seems to have no sense for MP4 case)

Tthere's a concept of "timebase". MPEG-TS has timebase of 1/90000 (90
kHz), thus 90000 units of dts/pts represent 1 second. I don't remember
same about MP4.
You can convert timestamps from one timebase to another, using
function av_rescale_q().

-- 
Andrey Utkin


More information about the Libav-user mailing list