To get an idea of what the trains are like, advice on booking, and some (but not all) of the times, the
Seat 61.com page on Spain is worth a read
Depending on luggage and train timings, you could also look at taking a normal French train from Marsellie towards the border, stop off, then carry onwards to Barcelona on a different (eg Paris) service. There are some lovely towns along that route to visit if you have the time!