Considering that you only have five months till your passport expires, the best alternative will be to get a new passport before your interview. It’s not that big of a deal. You simply have to notify the German embassy of your new passport details, and they will update your information.
As a student, you initially come to Germany with a visa that is valid for three months/ninety days. Some Embassies might give six months. You then apply to extend your visa after your arrival in Germany. The rule is that your passport must not only be valid on the day you enter Germany but also for three months after that. On the planned date of departure from Germany, your passport should have at least three months validity. Even though as a student you don’t intend to depart from Germany any time soon, the three months visa (or sometimes six months) that you are initially given is more or less like a tourist visa which means your passport and other documents accepted for entry must, therefore, be valid for a minimum of three months beyond the period of your intended stay until you have had your visa extended in Germany.
Since the entire visa process can take several months, it is highly likely your old passport wouldn’t satisfy the three months passport validity requirement by the time your visa is issued, and you leave the borders of your home country to Germany. You therefore run the risk of being denied boarding.