There is strong evidence for inbreeding in ancient egypt and as far as I know in viking culture and in many middle eastern societies. But did the general consensus that inbreeding is bad for humans start to spread during the medevial societies of Europe, or even later? How big was the unwanted inbreeding on the countrysides and in the cities of Europe during the medevial period? Did people even care if they married a cousin or even a sibling?
Inbreeding often happened historically because of two reasons.
The first was inheritance. In England, land could not be split in an inheritance, and there were thus very little incentive to marry your relatives to bring family land back to the family.
Secondly, it happened because of small populations and a lot of inmarriage amongst them. If there were little movement of population, and a small base population, inbreeding would happen regardless of culture.
For a small example, I am femmänning (fourth cousin) with myself, which means my grandparents were second cousins - they come from a relative isolated and sparsely populated part of Jämtland, were this was common. There were children in the 30s having their 6th finger removed at the hospital in the village I herald from.
I have not heard of the vikings inbreeding that much - siblings certainly did not marry, but cousins and second cousings did. What is your source on early medieval Scandinavian inbreeding?
The notion that it is for the best if you marry outside your clan or village have existed long before medieval times in Europe.
At least with respect to continental Europe, there were fairly clear rules about the degree of relationship (Consanguinity) within which marriage was allowed. At first that followed Roman civil law, prohibiting marriages any closer than first cousins. In the 9th century this was expanded to 7 degrees, so anyone up to and including a sixth cousin was prohibited; the 4th Lateran Council changed it back to four degrees (in 1215).
So cousins, depending on your period; siblings, no. If it was done without knowledge, it was grounds for annulment.
C. Bouchard, Those of My Blood: Creating noble Families in Medieval Francia, 2001. J. Brundage, Law, Sex, and Christian Society in Medieval Europe
The Medieval Catholic Church had quite specific rules regarding marriage to cousins. The Lateran Councils changed these rules several times at times making them more stringent and at times relaxing them.
In small villages at the times when the regulations were most stringent it see to have been very difficult for people to successfully find marriage partners within the law.
(Texts of all Lateran Councils are available online)