In most provinces you can apply for your extension with 30 days or less remaining (some 45 and some just 7). You ask your hotel/landlord for a copy of the TM30 soon after check in as they can only print a copy up to day days after registering you.
There is no online application in country, you find a school, get the required documents (this takes longer than 15 days usually) then you go to Immigration to apply for your Visa.
no we don't, not for the 2 year initial Thai DL. I got mine in Sa Kaeo province a year ago, no video, just the 3 tests, completed in 75 minutes from arrival to departure. 5 year renewal is different. Visa is not (always) irrelevant as I had to provide a copy. It differs from province to province so there is no one fit for all, this is Thailand (TiT).
TM30 is the registration of a foreigner staying and it is normally done online by the hotel/landlord which creates a PDF that can be printed when required