Also get a text track and put it in the movie. Also get some text media, and put it in the text track. Media consist of a sequence of drawings.
Text consists of a sequence of sentences.
Write them into a buffer, and pass that buffer to the text handler to put into the track. When all is done, put the movie into the file. Then deallocate or free all the data structures you have allocated. Tell the viewer where the ball is. Special facility in QuickTime Pro if the text tracks really represent different languages.