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="font-family:'courier new',monospace"><b>MP4 MPEG2-TS</b></span><br>
<font face="courier new, monospace">1.84467E+19 126000<br>2000 141015<br>1000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">137261<br>4000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">148523<br>
3000</font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace"> 144769<br>6000</font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace"> 156030<br>
5000</font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace"> 152276<br>8000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">163538<br>
7000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">159784<br>10000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">171045<br>
9000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">167291<br>12000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">178553<br>
11000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">174799<br>14000</font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace"> 186060<br>
13000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">182306<br>16000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">193568<br>
15000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">189814<br>18000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">201075<br>
17000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">197321<br>20000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">208583<br>
19000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">204829<br>22000 </font><span style="font-family:'courier new',monospace"> </span><font face="courier new, monospace">216090</font><div>
<font face="courier new, monospace">... ...</font></div>