Yes, your YouTube videos can be used as evidence against you in court. Police and prosecutors are increasingly often using information from online posts to help build cases, as in this example from New York City:

It’s not all cut and dried, of course; as with any artistic work, the police and courts have to try to figure out what’s fact and what’s fiction. An interesting discussion of the legal issues: