To be honest, it's probably better to fly, but if you want to take the train, you will need to take a train first from Barcelona to Venice in Italy. Then you will need to take the train from Venice to Vienna.
According to Rail Europe, distributor of train tickets and rail passes, approximately between 7 and 10 hours.
lyon - vienna
Vienna is the capital of Austria. Venice is in north-eastern Italy, on the Adriatic Sea.
5
about 3 hours by train
4 hours
The flight distance from Venice, Italy to Vienna, Austria is: 270 miles / 435 km
a few hours
San Mariano is in the Philippines (according to Wikipedia). There is no way you can get a train there from Venice!
How long it takes to get from Venice to Brindisi on the train depends on the service. It can take between 8.5 and 9.5 hours to travel between the two cities.
The Train for Venice was created in 1938.