Add metadata to replay

How can I add metadata (e.g. date recorded, level name recorded in, etc.) to a replay? So far I’ve tried making a separate save file with all the metadata but I’d rather have everything stored in a single .replay file.