Subtitles are text representing the contents of the audio in a film, television show, opera or other audiovisual media. Subtitles might provide a transcription or translation of spoken dialogue. Although naming conventions can vary, captions are subtitles that include written descriptions of other elements of the audio like music or sound effects. Captions are thus especially helpful to people who are deaf or hard-of-hearing. Other times, subtitles add information not present in the audio. Localizing subtitles provide cultural context to viewers, for example by explaining to an unfamiliar American audience that sake is a type of Japanese wine. Lastly, subtitles are sometimes used for humor, like in Annie Hall where subtitles show the characters' inner thoughts, which contradict what they were actually saying in the audio.
Creating, delivering and displaying subtitles is a complicated and multi-step endeavor. First, the text of subtitles needs to be written. When there is plenty of time to prepare, this process can be done by hand. However, for media produced in real-time, like live television, it may be done by stenographers or using automated speech recognition. Subtitles written by fans, rather than more official sources, are referred to as fansubs. Regardless of who does the writing, they must include information on when each line of text should be displayed.
Second, subtitles need to be distributed to the audience. Open subtitles are added directly to recorded video frames themselves and thus cannot be removed once added. On the other hand, closed subtitles are stored separately, which can allow subtitles in different languages to be used without changing the video itself. In either case, there are a wide variety of technical approaches and formats used to encode the subtitles.
Third, subtitles need to be displayed to the audience. Open subtitles are always shown whenever the video is played because they are part of the video itself. However, displaying closed subtitles is optional since they are overlaid onto the video by whatever is playing it.