The captain being able to marry people on his ship is a bit of a myth. It dates from the era of voyages taking months, so if a couple got together during the voyage they were unable to marry and at that time it would have been frowned upon for them to 'do the squelchy' before marriage, at least on a ship where being discreet would have been impossible. Getting the captain to perform the ceremony wasn't legally binding, and a couple would have to get the marriage legitimised when they docked if they wanted it to be legally binding.
I suppose that's possible for the ones you see in the movies. The ones I know of here though are usually part of the whole wedding plan; they plan a cruise and have the wedding done at sea. Possibly they have their own minister accompany them (or possibly the large cruise ships even have their own Chaplains aboard now) As I said, Florida is one of 3 states that allow Notaries Public to perform weddinds; while i'm not sure, I would assume that Ships' Captains have Notary priveledges (I know that military officers, law enforcement officers, judges, mayors, and governors, correctional officers do)
All that being said, when a wedding is performed here (by who-ever) the officiant performs the ceremony and signs the marriage license (as do the bride and groom) then the license is "recorded" at the local courthouse. This step must happen no matter where or by whom the ceremony is performed but it is NOT considered a part of the wedding; the wedding is always separate from the "recording." The only exception (to having it recorded at the local courthouse) would be those weddings performed abroad or in areas not under the jurisdiction of any individual state (such as a ship beyond the territorial limits of a state) or in areas where the US (Federal government) has "extra-territorial priveledge" such as an embassy, or military installation overseas. In that case the recording would be the embassy or a federal court.