Is it legal to film someone and upload it to YouTube? I keep seeing videos of people throwing racial slurs or doing something bad on YouTube. I am wondering if it's even legal to post people doing these things on a public platform without their consent. Can you be successfully sued for this? I am thinking you can seriously get sued since it can cause someone to lose a job or worse. What are the U.S. laws on this?
You have no right to privacy in public
What you do and say in public is … public.
In general, in common law jurisdictions, anyone and everyone has the right to record you unless you have a “reasonable expectation of privacy”. Where the exact line on that is situational but if you are shouting racist slurs, you don’t have it.
The person who made the recording owns the recording and none of the people in the recording have a say in what they do with it.
However, under privacy laws like the GDPR, a person’s image and voice are personal data so any data processor must have a legal reason for processing it. However, such laws do not usually extend to private individuals acting in a private capacity. So images captured on a private phone are unlikely to be caught while images on a corporate CCTV system will be.
This varies a great deal by jurisdiction. In the US, the rule cited in the answer by Dale M applies in many situations, that a person has no reasonable expectation of privacy in what s/he says or does in public, and anyone may publicize it, including by posting a video of it. However, in several states a "right of personality" applies. That is, in those states one may not use another person's name, likeness, or words to advertise or promote a product or service without permission. This mostly applies to celebrity endorsements, but has also been applied to the use of customer comments as testimonials. The exact limits of this right vary, and have been disputed, but videos of a person "acting badly" are not likely to be protected by this rule.
Some US states recognize the tort of "public disclosure of private facts" but that generally requires that at least a reasonable effort has been made to keep the facts private, and that a reasonable person would find the disclosure to be "highly offensive". This will not usually apply to the kind of situation described in the question, a social media or other web post showing a person "acting badly" in public. In addition, the very existence of this tort has been challenged on Constitutional grounds in the US, and many states do not recognize it.
If the video as distributed is so edited or commented on as to give a seriously misleading impression, it may come under the tort of "false light" in some US states, or may constitute defamation by implication. That is, i9f a reasonable viewer might well draw a false conclusion, one that could injure the reputation of the person depicted, that might be something that the person could successfully sue on. But the plaintiff would need to establish that the conclusion is in fact false, that a reasonable viewer would be likely to draw it, and that it was in fact injurious. The plaintiff might also need to establish actual harm to reputation, depending on the details and the exact jurisdiction.
In countries other than the US, the laws may well be quite different. In some such countries, any use of a person's image without permission may be actionable.
The gdpr and other similar privacy laws require a lawful basis to distribute personal information tied to an identifiable natural person. A video of a person is certainly personal information (PI). GDPR Article 6 paragraphs 1(e) and 1(f) identify "processing is necessary for the performance of a task carried out in the public interest" and "processing is necessary for the purposes of the legitimate interests pursued by the controller or by a third party" as potential lawful bases.
Recital 153 of the GDPR says, in relevant part:
... The processing of personal data solely for journalistic purposes, or for the purposes of academic, artistic or literary expression should be subject to derogations or exemptions from certain provisions of this Regulation if necessary to reconcile the right to the protection of personal data with the right to freedom of expression and information, as enshrined in Article 11 of the Charter. 3This should apply in particular to the processing of personal data in the audiovisual field and in news archives and press libraries. ... In order to take account of the importance of the right to freedom of expression in every democratic society, it is necessary to interpret notions relating to that freedom, such as journalism, broadly.
Thus public reports of public actions of potential public interest may well be considered to have a lawful basis, and no0t be restricted by the GDPR.