Who could perform it
Priest, magistrate, ship's captain, nobody at all — the authority to marry two people has moved around considerably, and wherever it sat determined what the paperwork looked like.

A shifting franchise
For most of medieval Western Europe the question barely arose: a Catholic priest presided, and that was that. But the Council of Trent in 1563 made priestly presence a formal requirement for Catholic marriages — before that, the Church had recognised a couple's own consent as sufficient. A priest might be desirable; he was not always strictly necessary. The Reformation complicated the picture further. Protestant territories handed varying degrees of authority to civil officials, and England's Interregnum briefly made marriage a purely civil act, conducted before a Justice of the Peace, before the Restoration returned it to the clergy in 1660.
Civil registration, when it came, split the function rather than replacing it. England and Wales from 1837 (where civil ceremonies became an option alongside Anglican and other religious ones), France from 1792, and most German states across the nineteenth century introduced a civil ceremony — performed by a registrar or equivalent official — as the legally binding act. A religious ceremony could follow, but the state cared about its own register, not the church's. Scotland kept its own rules: a minister, a registrar, or in older practice a declaration before witnesses with no officiant at all were each capable of producing a valid marriage.

The ship's captain is a persistent myth. Maritime law gave captains no general authority to solemnise marriages; the story appears in fiction far more reliably than in statute. Some narrow wartime provisions and certain national codes created limited exceptions, but the romantic notion of the captain as universal marriage officer has little legal substance behind it.

In parts of the early American colonies, where clergy were sparse, civil magistrates and even lay elders took on the role by necessity. Quaker meetings, which had no ordained ministry at all, married couples before the gathered congregation — a form that took decades to gain acceptance in English law. The paperwork in each case followed the officiant: a Quaker marriage produced a sheet signed by every witness present rather than an entry in a parish register.
Wherever the franchise sat, it fixed what was recorded, who held the document, and which archive eventually received it. The officiant and the register were always the same problem.