More and more fencers on videos fight with longswords for instance :
Verfliegen Recital - German Longsword - YouTube
How historically accurate is it ?
Did they do fencing as we know it (as a sport and for "glory") or was it only military practice ?
Fencing was a widespread cultural activity with participants of nearly every class in nearly every culture in Western Europe during the medieval period. While it was obviously an element of warfare, swords were generally considered secondary to a polearm - like a lance or halberd or pike, or crossbow or musket - among different classes of fighting men, from professional mercenaries to fighting noblemen to civic militias. All of these men would find the question of what fencing was for very odd: fencing was fencing. It was a thing you did for itself, just like singing or dancing. Fencing is fun, and it was regarded as such even as far back as the 13th century. An advice book written in 1275 lists fencing, along with riding practice and lance practice, as an "amusement" among the king's guardsmen. Pietro Monte, a 15th century master at arms, similarly describes fencing along with a diversity of other physical activities for men of arms to practice.
Other advice books have a remarkably consistent list of activities for the physical education of the youth that include dancing, wrestling, leaping or vaulting, swimming, climbing, riding and jousting, shooting, climbing, and fencing. For example, Jörg Wilhalm Hutter, an early 16th century fencing treatise author and Augsburg hatter, wrote the following:
Throwing stones, shoving staves, fencing and wrestling, dancing and jumping, jousting and tourneying, with these should one curry favor with women, yet fencing also wants pranking and jesting.
This is presented in most of these books as amusements in their own right, but also as a means of training the body and acclimating the mind to stress and endurance for, among other things, warfare. I talk a bit more about athletic amusements here.
But fencing is also unambiguously a part of tournament culture, both among the nobility and the lower classes. There were, without exaggeration, dozens of different kinds of tournaments and competitions, and even if we were to limit ourselves to one place and one decade, there would still be a huge variety in the ways that men competed and the ways that men played. For the purpose of this question, foot combats and melees often involved fencing with blunted swords or clubs, and certain kinds of single combats might involve numbered passes against one another with lance, sword, pollax, and daggers - but the variations in single combats for friendly competition or for other purposes is far far too complicated to really dive into here.
So to bring this to a conclusion: fencing is of course an element of athletic culture in the medieval period, and is a part of the culture of play among classes high and low. It was viewed as an "amusement" in its own right and as a good exercise to boot. Fencing is also of course an element in warfare, as writers of fencing treatises themselves also discuss. For instance, Joachim Meyer, a cutler from Strassburg, wrote in 1570 that
military leaders among all nations have so earnestly kept the troops they commanded in this practice, that sometimes when they would lie idle before the enemy, they would personally teach their soldiers how to handle their armour, weapons, and arms advantageously, and also skillfully to bear off the enemy's strokes and thrusts, and to place their own correctly, which is particularly documented concerning Hannibal
and
the art of fencing is a particular element of the practice of war, and through this practice, the student is very masterfully stimulated to greater reflection to use every kind of advantage, along with many more other uses that this practice brings with it. It is likewise with the fact that single combat is a fine image in miniature of how a war leader should conduct himself against the enemy
Meyer is not a lone genius here, as the connection between fencing and warfare is quite evident, but Meyer was also a patron of an activity called a Fechtschule or a fencing festival. They were competitions among Burghers to compete in non-lethal fencing games in single fencing bouts, the winner of each being the man who struck their opponent a bleeding wound on the crown of the head with a blunted special-purpose fencing sword, which is called today a Federschwert. The Burgher class itself was no stranger to military duty, either; they were expected to function as town watchmen, firefighters, and to fight battles in defense of the city if called upon.
So Meyer's purpose, like all other fencing treatises, is to teach the serious and useful martial practice of war and also an activity people could engage in for fun, and money (winners also received two gulden per victory, about a week's wages on average, which I expand on in this old answer if you're interested), and for class clout, fame, honor, and glory. The Fechtschule deliberately modeled itself on the games of the nobility, who also prized public performance of skill as a useful skill and worthy practice and not only because these skills were related to warfare. Meyer's position as the master at arms for the Duke of Mecklenberg, Johann-Albrecht I, just prior to his death also lets us see that this skill transcended class: if a burgher was considered skilled enough to teach warlike skills to the nobility, there couldn't have been much difference in their approach.
Ultimately, I think the main takeaway is that fencing is fencing. It was likely most often done because it's fun, and as part of an athletic culture that encouraged private practice and public performance it was considered important, and connected not only to high-profile public demonstration, but also to warfare and fencing in private quarrels or duels.
You can read a translation of the 1275 manuscript The King's Mirror here
Pietro Monte's Collectanea, Translated by Jeffrey Forgeng
The Art of Combat, by Joachim Meyer, translated by Jeffrey Forgeng
The Martial Ethic of Early Modern Germany, B. Ann Tlusty
The Tournament and its Role in the Court Culture of Emperor Maximilian I, Natalie Margaret Anderson
I seem to read multiple questions here. First, how accurate these modern HEMA fencers are? I am not a practitioner, but I have followed the scene for about 10 years now. The answer, as you can guess, is "it depends". All I can say is that the most serious clubs are as accurate as one can reasonably get. I say so because they make a point of exclusively studying original Late Medieval and Early Modern fencing treatises, a great many of which luckily survived to this day. There is plenty of room for interpretation, naturally enough, so I could not swear any of them are 100% accurate. You also asked whether fencing was practised as a sport. The answer to this one is yes, definitely, at least in some times and places. Beyond various forms of tournaments, which often involved some swordfighting, XVI century Southern Germany had Fechtschulen (fencing schools) which, counterintuitively, were not schools but rather fencing competitions. Partecipation was open to townspeople, who also made up the bulk of the two main corporation of fencing masters (St. Mark's Brothers and Feather Fencers).
On fencing treatises:
Sydney Anglo 2000. The Martial Arts of Renaissance Europe. Yale University Press. (General survey of the main treatises and their cultural contexts, includes discussion of knightly tournaments).
Various Authors 2016. Late Medieval and Early Modern Fight Books: Transmission and Tradition of Martial Arts in Europe (14th-17th Centuries). Brill. (Essays on many topics, of varying interest, information on Germany is scattered here and there). Available here.
On Fechtschulen:
B. Ann Tlusty 2016. Martial Identity and the Culture of the Sword in Early Modern Germany (Ch. 18 in the book linked above.)
Also, if you want to give a look at the original treatises, you will find a few with serviceable English translations here.