Relevant standard documents
A very frequently asked question is what standards are relevant to subtitles and where to get them. I can't help with the 2nd part directly -for most files-, because many of these standards are not publicly available. I purchased my copies of both CEA-608 and CEA-708. However googling for the correct names usually gets you at least to a draft that is perfectly fine to get started.
For GSOC students - I may be able to share my copies with you as part of the project once you are accepted.
These are the standard names and file names you want to look for:
Closed captioning (i.e. North American subtitles)
CEA-608.pdf -> The standard for analog subtitles. You can also purchase the official document here.
47cfr15.119.pdf -> FCC: Closed caption decoder requirements for analog television receivers.
708-B (DTV Closed Captioning).pdf -> 708 is the standard for closed captioning in the Digital era. 708-B is not actually the last revision but it's the last one I could find online. Differences with the D revision (the one I purchased some time ago) are minor. You can purchase the last version here.
a_53-Part-4-2009.pdf -> How closed captions are stored inside a transport stream.
T-REC-H.264.pdf -> H264 (check the SEI payloads for closed captioning specifics)
rp2052-10-2012.pdf -> Conversion from CEA-608 Data to SMPTE-TT .
Finally, a book recommendation. Gary Robson's closed captioning book.It's not a formal reference, but it comes with a lots of useful info and it's easy to read. I still check it out often even though I've read all the official documentation many times.
European subtitles
ets_300706e01p.pdf -> Enhanced Telext Specification.
en_300743v010301p.pdf -> Digital Video Broadcasting (DVB); Subtitling systems
Containers
ISO_IEC_14496-14;2003(E)-Character_PDF_document.pdf -> MP4 file format.