"The Sound of Music", the stage play and movie starring Julie Andrews, was based on the 1956 German film "Die Trapp Familie." This in turn was based upon the book by Maria Von Trapp (the character later played by Julie Andrews), published in 1949 and called "The Story of the Trapp Family."
Wolfgang Reinhardt bought the story of the Trapp family from Maria for just $9,000. Being in a position of financial difficulty, Maria was forced to accept the offer and sign away any and all rights to the story. Maria had a hand in the writing of the film's screenplay, however, as well as that of its sequel, "Die Trapp Familie in Amerika" (1958).
To make the 1965 musical, the film rights were bought from the German company. Unfortunately, Maria did not see many profits from the film, although the film did help to increase the popularity of the Trapp Family Singers.
https://www.sound-of-music.com/sound-of-music/the-beginning/