You can do it at the border in Laos. Thai immigration will stop u on the friendship bridge and send you over to another building to do it. They even gave me a bicycle to cycle over to the building ha. It was free of charge but get there early as u need to be in savannakhet before 11am to apply for your visa.