Since October 2017 is a ways off, maybe you should rethink the course a bit. For me, the money to travel is more available than the time to travel; so there has to be a good reason for me to spend over 7 hours in transit anywhere. That's half my waking day; besides trains just bore the heck out of me.
When I find this predicament in my planning I start looking for a stop in-between. If by train, that might be Vienna in your case.
But sometimes this is an opportunity to do something off the wall if you want. Go to Google Flights and put in Munich as a start and Europe as an end and see what discount airlines fly to Munich non-stop. Then do the same with Budapest, then look for overlap between the two.
For instance, depending on the day of the week, a flight from Budapest to Nuremburg is $28. Spend the night, see the town, then its a short train ride to Munich.
More extreme, but worth the effort would be Budapest to either Belgrade or Kiev; both for about $100 then Belgrade or Kiev to Munich is another $150 or so.
But the schedules and cost vary widely by day of the week and a lot of the discount airlines don't post routes and rates more than 4 - 6 months in advance.