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

chinos chinos at microrapid.com
Mon Aug 27 16:01:05 CEST 2012


MPEGTS is based on 90 kHz clock. 
In your example, the fps of the stream is computed as follow:
1/((141015-137261)/90000) = 24fps

but i am confused why PTS of TS is always not started at 0. could anyone explain it to me?
 
------------------ Original ------------------
From:  "Wagner Patriota"<wagner.patriota at gmail.com>;
Date:  Mon, Aug 27, 2012 06:54 PM
To:  "This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter."<libav-user at ffmpeg.org>; 

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

 
I am studying how PTS/DTS works and therefore making some tests with transmuxers...

I would like to understand how ffmpeg converts the PTS from an MP4 to a MPEG2-TS


The ffmpeg transmux (-vcodec copy) does this conversion:
 

What is the formula for this conversion? (probably with exception for the first PTS, that seems to have no sense for MP4 case)




MP4           MPEG2-TS
 1.84467E+19   126000
2000          141015
1000          137261
4000          148523
 3000          144769
6000          156030
 5000          152276
8000          163538
 7000          159784
10000         171045
 9000          167291
12000         178553
 11000         174799
14000         186060
 13000         182306
16000         193568
 15000         189814
18000         201075
 17000         197321
20000         208583
 19000         204829
22000         216090 ...           ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120827/b2613599/attachment.html>


More information about the Libav-user mailing list