Hi, I'm trying to make a script that can extract data from a Replay so it can use the information to automatically put an overlay on the replay video. For example, I want the health of certain players to be visible on the video. I could do that manually in a video editor but syncing it would be a pain, so that's why I decided to use a script. However, I can't find a documentation on how Replay files work. Does anyone know where I could?
This is how the RM reads the tmcpr files: https://github.com/ReplayMod/ReplayStudio/blob/master/src/main/java/com/replaymod/replaystudio/io/ReplayInputStream.java
It's probably far more complicated than necessary for what you want to do (cause it also does stuff like backwards compatibility with older RM versions and converting replays between Minecraft versions via ViaVersion).
This post probably has all you really need to know.