My understanding is that it's not illegal to film people in public where there can be no reasonable expectation for privacy. However, if that's the case, why do so many channels on YouTube ask people if it's OK to show them in their videos? Are they being polite, or is it part of YouTube's policy? Is it possible I don't understand the law correctly and that filming people in public does actually require consent?
The legal jargon for this is CYA which stands for "Cover Your Donkey" only you spell Donkey with an "A" and it's three letters long and I'd prefer not to find out that I'm not allowed to use that word on Stack Exchange, thank you.
Essentially, even if it's legal to film in public, it's a rather simple way to quickly make sure that your immunized, even if you should have had waivers. Essentially, if you ask a person and they say yes, you can leave the footage in and if they do decide to sue you, the footage you released has them orally waiving the right to not be filmed. It's not a slam dunk guarantee that you'll win, but it will definatly hurt their chances while helping yours.
If no, you have one of two other options: Either the you can cut all segments without that person out and thus it never gets published, or you can use their "no" against them in that they were trying to dodge the filmed response they were giving (there's no rule saying you can't film a cop, but there's also no rule saying cops can't lie to you and say you can't film them. More often then not, the person behind the camera will believe the cop (or they don't but they don't want to find out the cop is right... to to the extent that the cop could arrest them. But some other people know better, but may comply while loudly complaining that it makes the cop look bad for hiding something from the public (and then quickly turning it off before the cop can explain). On the otherside, cops do have to let witnesses know when wearing a body camera and in uniform, but they don't have to record cooperating witnesses if they don't want too... usually they'll turn it off when dealing with a victim witness or a witness who doesn't want the fact they are witnesses to be known to the public. Usually the cops will make verbally communicate that the witness is not willing to be filmed giving the specifics of the statement and that they have been informed of the potential of some risk to either party while the camera is off... They may have a back up there to verify what happened while both cameras are turned off in the report.
Additionally, while it might be illegal for a private to record someone committing a crime without their knowledge, the prosecutor can still make a deal to not prosecute the illegal recording, in exchange for testimony at the filmed suspect's trial. This makes the recording legal at the criminal suspect's trial as it was not obtained through investigation of the accused's crime, but by someone else's "confession" to an unrelated crime, and thus legally obtained for that crime and legally usable as evidence of another crime. It also allows for limited "Hearsay" testimony on the Prosecutions part as statements against interests are generally admissible hearsay ("Any thing you say can and will be used against you" notice how the cops never say it could be used to help you? Because you can say that stuff in court yourself, where your lawyer would tell you to shut up about the parts that make you look bad.") A witness that says "I was committing a crime when I saw him committing a worse crime and am risking my own conviction to tell you what he said or did" is not committing hearsay as one would not testify to their own crime when lying in court.
Other laws work around this by saying that it's not a violation of consent to record if you are recording a crime in progress.