Music royalties paid by Youtube

How much of a song has to be played before YouTube pays royalties?

For example, if somebody used 10seconds of a Metallica song as an intro to their original content.

Would the YouTube algorithm pick up and pay royalties on those 10seconds?

detection and payment are two separate processes.
detection is based on digital fingerprints. Beyond that, Google is rather secretive about the specifics of it’s detection algorithms to prevent dishonest users from working around them.

Once google has detected that a video may contain copyrighted content, it reports that video to the associated copyright holder (fingerprints are created at the request of a copyright holder, from samples provided by the holder), it informs the holder and gives them options for responding. One of the options is to receive a portion of any revenue from that videos presence on youtube. If a video wasn’t already monetized, youtube will add advertising.

There’s a good deal of controversy around this program for a number of reasons: false-positives (content incorrectly identified as copyrighted or copyrighted by somebody else), googles handling of disputes, a number of people abusing the system by claiming copyrights they don’t own or for material that is inherently uncopyrightable (e.g. nature sounds), it’s legality, and many other factors.

I can say from experience that the ContentID system (which does the detection of copyrighted material) will detect clips shorter than 10 seconds, but since the specifics of how it works aren’t published, I don’t think you’ll be able to nail down an exact value. I think the shortest duration I’ve seen was about a 6 second clip of music that was matched.