<span class="st">MPEGTS is based on 90 kHz clock. <br>In your example, the fps of the stream is computed as follow:<br>1/((141015-137261)/90000) = 24fps<br><br>but i am confused why PTS of TS is always not started at 0. could anyone explain it to me?<br></span><div><includetail><div> </div><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "Wagner Patriota"<wagner.patriota@gmail.com>;</div><div><b>Date: </b> Mon, Aug 27, 2012 06:54 PM</div><div><b>To: </b> "This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter."<libav-user@ffmpeg.org>; <wbr></div><div></div><div><b>Subject: </b> [Libav-user] Conversion of PTS from MP4 to MPEG2-TS</div></div><div> </div>I am studying how PTS/DTS works and therefore making some tests with transmuxers...<div><br></div><div>I would like to understand how ffmpeg converts the PTS from an MP4 to a MPEG2-TS</div><div><br></div><div>The ffmpeg transmux (-vcodec copy) does this conversion:</div>

<div><br></div><div>What is the formula for this conversion? (probably with exception for the first PTS, that seems to have no sense for MP4 case)</div><div><br></div><div><br></div><span style="  ;  "><b>MP4           MPEG2-TS</b></span><br>

<font face="courier new, monospace">1.84467E+19   126000<br>2000          141015<br>1000 </font><span style="  ;  ">         </span><font face="courier new, monospace">137261<br>4000 </font><span style="  ;  ">         </span><font face="courier new, monospace">148523<br>

3000</font><span style="  ;  ">         </span><font face="courier new, monospace"> 144769<br>6000</font><span style="  ;  ">         </span><font face="courier new, monospace"> 156030<br>

5000</font><span style="  ;  ">         </span><font face="courier new, monospace"> 152276<br>8000 </font><span style="  ;  ">         </span><font face="courier new, monospace">163538<br>

7000 </font><span style="  ;  ">         </span><font face="courier new, monospace">159784<br>10000 </font><span style="  ;  ">        </span><font face="courier new, monospace">171045<br>

9000 </font><span style="  ;  ">         </span><font face="courier new, monospace">167291<br>12000 </font><span style="  ;  ">        </span><font face="courier new, monospace">178553<br>

11000 </font><span style="  ;  ">        </span><font face="courier new, monospace">174799<br>14000</font><span style="  ;  ">        </span><font face="courier new, monospace"> 186060<br>

13000 </font><span style="  ;  ">        </span><font face="courier new, monospace">182306<br>16000 </font><span style="  ;  ">        </span><font face="courier new, monospace">193568<br>

15000 </font><span style="  ;  ">        </span><font face="courier new, monospace">189814<br>18000 </font><span style="  ;  ">        </span><font face="courier new, monospace">201075<br>

17000 </font><span style="  ;  ">        </span><font face="courier new, monospace">197321<br>20000 </font><span style="  ;  ">        </span><font face="courier new, monospace">208583<br>

19000 </font><span style="  ;  ">        </span><font face="courier new, monospace">204829<br>22000 </font><span style="  ;  ">        </span><font face="courier new, monospace">216090</font><div>

<font face="courier new, monospace">...           ...</font></div>

</div></includetail></div>