Earlier this year, a convenient, fairly popular and reasonably quick Ljubljana-Venice route was sliced from the timetables. It was Trenitalia that wielded the scalpel, choosing to use the tracks in the late AM hours for local traffic.
So now the only option with a reasonable departure time is routed north through Villach, Austria (where you change), and then back south via Udine. Aesthetically, it’s a much nicer ride; the downside is that the old 3 hr 20 min trip is extended to just under 5 1/2 hrs. Another upside is that you arrive about two hours earlier than with the old option, opening several more options if you’re connecting onwards from Venezia-Mestre.
Dep Ljubljana 08:05 – IC 310
Arr Villach Hbf 10:00
Dep Villach Hbf 10:37 – OEC 31 / EC 31
Arr Venezia Mestre – 13:18
Arr Venezia Santa Lucia – 13:30
With at least seven day advance purchase, price is as low as 15 EUR one-way. Much less than the cost of parking your car for an afternoon in Venice.
Ljubljana-bound from Venice:
Most practical is the same route with a mid-afternoon departure, travel time 5 hrs, 4 min.
Dep Venezia Santa Lucia 14:44 – EC 30
Dep Venezia Mestre 14:56
Arr Villach Hbf 17:40
Dep Villach Hbf 18:04 – IC 311
Arr Ljubljana 19:48
If you don’t mind a much later arrival, you can leave Venice in the evening, no change, and spend less time traveling (4 hr 24 min).
Dep Venezia Santa Lucia 21:27 – EN 241
Dep Venezia Mestre – 21:40
Arr Ljubljana 01:51
Some more info on the SLO Rail site. As always the first place to look for connections in all of Europe (EU and non-EU) is Bahn.de.