Extract PTS, Frame Number from a TS file using the bytes representation of it
As per my reading of the demuxer, this is the method to derive the PTS from a base 16 dump.

b'4700ff1de05ca7686c2b43f5e37e6dafd388761c36900ab37...


Skip the first 7 bytes, or more precisely, the first 3 bytes after the PID (00ff). The timestamp is derived from the next 6 bytes.

a7686c2b43f5


There are two components to the PCR - the 90 kHz clock and a 27 Mhz extension.

First left-shift the initial 4 bytes by 1

a7686c2b &lt;&lt; 1 = 14ed0d856


Then right-shift the 5th byte by 7 i.e. isolate the high bit.

43 &gt;&gt; 7 = 0


Bitwise-OR the above two results.

14ed0d856 | 0 = 14ed0d856


The above result is the first component C1.

Now, isolate the low bit of the 5th byte and left-shift it by 8

(43 &amp; 1) &lt;&lt; 8 = 1


Bitwise-OR this result with the 6th byte

100000000 | f5 = 01f5


This is the 2nd component C2.

The timestamp in the 27 Mhz timebase is C1 * 300 + C2. In seconds, that is 

(5617277014 * 300 + 501) / 27000000 = 62414.189063s


You can ignore C2 and just divide C1 by 90000 to get a less precise timestamp.