Hopefully I'm not missing something (probably I am), but I used to be able to decode packets in Replay files using the pattern described here, but for some reason it doesn't work now.
Here's the Python code I'm using:
import struct
with open("recording.tmcpr") as fin:
while True:
t, l = struct.unpack(">ii", fin.read(8)) #reads two big-endian 4 bit integers (timestamp and length), which I what I assume Java uses.
print t, l
fin.read(l) #skips past the packet itself for now.
6 48
14 18
15 75
15 16
15 85
15 2
15 9
15 10
117 2
1071 2
1071 14
1071 14
1071 14
1071 14
1071 14
1071 14
1071 14
1071 14
1071 14
1071 14
1071 6
2002876787 16711680
Traceback (most recent call last):
File "C:\Users\Mungo\Documents\ReplayReader\replayreader.py", line 4, in
t, l = struct.unpack(">ii", fin.read(8))
error: unpack requires a string argument of length 8
It basically ends early, without reading all the packets.
It's partially based on the code from the
.tmcpr recovery script. Interestingly, if I run the script on the extracted recording.tmcpr I used above, the replay is still valid and works correctly, but its duration lasts only one second. The Replay Viewer still ignores that though, so the replay carries on playing despite the timeline reaching its end. The format must have changed, then. But to what, out of curiosity?