Non immigrant O

For a marriage visa you need a non immigrant visa O to start with (double checked).
Get one abroad, not in Thailand (double checked).
My wife and I flew from Chiang Mai to Udonthani with Nok air 4:10 pm. on a Tuesday.  At Udon airport we went to limousine services near the exit and bought a minivan ticket to Nong Kai (200 baht pp).  It is a 45 min drive of about 50 km. Services stop at 5:30 pm. I was told.
At the border in Nong Khai we passed Thai customs. They took my departure card from my passport. Right behind the custom's booth we bought tickets to get  across the bridge (20 baht). A large bus picked us up for the 500 m ride. At the Laos border I filled out some forms I   obtained from window number 1 of Laos custom's office. Drivers of minivans hang around and show you what to do, because they want to bring you to down town Vientiane for 200 baht.
I paid 1500 baht for the Laos visa. We  took the 200 baht ride to a hotel near the Thai consular section on Rue Bourichane,  the place to be for visa. Name of the hotel was Heuangchaleun , 600 baht. The room was small and shower not that clean.
Next day we moved to the hotel Lao Golden across the street. Much cleaner and more luxurious but also more expensive (1100 baht). The hotel Douang Pra Seuth opposite the Thai Consulate was unfortunately fully booked. Make reservations ( 85621 285255).
Next morning we were at the consular section around 6:15. Way too early. The gate opens at 7:30 and visa processing doesn't start before 8:30.
A tuktuk driver told us that Mondays and Thursdays are very busy up to 300 visa applicants. On Wednesday it is not crowdie. When we were there we saw around 40 people in total.
In front of the consular section people offer their services in copying passports and fill out forms for you. We had an outdated form so we made use of their services. Make sure you got all necessary copies: application form with 2 colour photos with white background; copy passport; copy Laos visa; copy id card Thai wife; copy marriage certificate; copy thabian baan (house registration).
Check Thai Embassy
The visa processing went smoothly. Passport and visa have to be picked up at 1:30 pm next day. They wont start any time sooner than 1:30 pm. I handed over the receipt I received the day before and paid the 2000 baht for a single entry non-immigrant O visa.
We took a tuktuk (50 baht each for 4 persons) to the bus station and bought tickets for a bus straight to Udanthani (95 baht pp).  The bus stops at both Laos and Thai customs offices and waits for you.
We had to stand in line and wait our turn, but that was all. The Thai customs officer crossed out my visa with the word USED. 
The bus left at 2:00 pm from Vientiane and arrived 4:50 pm at Udon bus station. We took a tuktuk (50 baht each for 3 persons) to the airport.
We bought two tickets from Nok Air (about 1400 baht pp) to fly back to Chiang Mai.

Long story why can u do it in chiang mei

The long story is just to share the information with people who are thinking about a visa trip to Laos.
Can you get the visa in Chiang Mai?  No, you can't.

Why don't u go Indonesia is most interesting country

And this is only part 1. The single entry is valid only 90 days, multiple entry is only issued by Royal Thai embassies abroad. It allows for multiple entries, but 90 day limit applies.

To turn it into an annual visa, without having to leave the country during the year, but having to report to the immigration office every 90 days, one can do part 2. One can apply for the annual spouse o-visa at an immigration division office. Aside of the documents for the entry visa, the officers will ask for lease agreement, photos one is living together, confirmation of a bank in Thailand the foreigner has been holding more than 400'000 THB in a bank account for at least two month or a certificate of income (can not remember the amount, but was around 40'000 THB a month) and last, but not least, the registration of the marriage in Thailand. To be applied for at the local community office.

Thought our international marriage certificate was enough. But it was not. If you got married abroad, register your marriage at Thai consulate or embassy before relocating to Thailand. Otherwise the community office will ask you for certified copy of a marriage certificate from the embassy of the country you got married in. And it's translation into Thai, as well as an official stamp from a Thai notary office. Than they will register the marriage and issue the Thai marriage certificate you need when applying for the annual visa.

Certainly one way of doing it. However you could enter Thailand on a tourist visa or even visa exempt and convert at Thai Immigration(in Thailand) to an O visa stamp. Then complete annual extension based on marriage. Issued after 30 day consideration period.