The following statement was made by Martin Luther from his “Here I stand speech“:
"I cannot submit my faith either to the Pope or to the Councils, because it is clear as day that they have frequently erred and contradicted each other. Unless therefore, I am convinced by the testimony of Scripture ... I cannot and will not retract ... Here I stand, I can do no other. So help me God, Amen."
The following statement you say was from the movie might be enhanced or summarized to include the essence of what Luther was saying but may not be an accurate historical quote.
"I confess that I have written too harshly. I am but a man and I can err. Only let my errors be proven by Scripture, and I will revoke my work and throw my books into the fire."
If you are speaking of the film “Luther” referring to the quote above; which is an excellent 2003 biopic about the life of Martin Luther (1483–1546); it does contain many historical inaccuracies. For example: In the film, Luther refers to Bible passages by the book, chapter, and verse. However, the Bible was not divided into verses until 1551, and even then the divisions were not ubiquitous until the Geneva Bible. (It can be assumed that this was done in order that discerning viewers might easily locate the text to which Luther refers.)
Luther was an independent biopic and was partially funded by Thrivent Financial for Lutherans, starring Joseph Fiennes and Alfred Molina.The film covers Luther's life from his becoming a monk in 1505 to the Diet of Augsburg in 1530.
The film ends with the following words:
“What happened at Augsburg pushed open the door of religious freedom. Martin Luther lived for another 16 years, preaching and teaching the Word. He and Katharina von Bora enjoyed a happy marriage and six children. Luther's influence extended into economics, politics, education and music, and his translation of the Bible became a foundation stone of the German language. Today over 540 million people worship in churches inspired by his Reformation.”