ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
130.19k stars 9.82k forks source link

How to identify a music video on YouTube or if a video is copyrighted? #22029

Open p-md opened 4 years ago

p-md commented 4 years ago

Checklist

Question

How can I check if a YouTube video is copyrighted? I'm specifically talking about music videos, is there any data that let us identify a music video? I have checked another similar issue, the answer was to check the license key, but this key will be available for all the videos and won't help us identify a music video.

Any suggested solution to find a music video? Like artist, creator or any other data?

Thank you.

samrahimi commented 4 years ago

Here's a partial solution that is specific to VEVO-branded music videos on YouTube, but it may be enough depending on your use case. It's useful because most of the official music videos on YouTube are branded / distributed by VEVO, and the metadata for these videos follows certain conventions we can use to help identify / search for such content. All VEVO-branded content is copyrighted and has been correctly licensed in partnership with the record label and artist. However, note that an artist's VEVO videos belong to the artist's YouTube channel, so you cannot use the "creator" or "artist" attributes to determine if a video is an official VEVO music video vs an ordinary YouTube video uploaded by the same artist.

Depending on the age of a VEVO video, it will use one of two templates for its metadata.

Old Format (example: https://www.youtube.com/watch?v=VuNIsY6JdUw)

title: Artist Name - Song Title description: contains "Music video by Artist Name performing Song Title"

New Format (example: https://www.youtube.com/watch?v=gxEPV4kolz0)

title: Artist Name - Song Title (Official Video) description: may contain #Vevo tags: may contain 'vevo'

Going beyond VEVO for a moment, all of the music videos on YouTube will specify 'Music' as the first / only entry in the categories array. Note that the 'Music' category by itself does not guarantee that the content is an actual music video - YouTube is full of lyric videos and audio-only videos.

Anyways, hopefully this is a useful starting point... if you want to get detailed copyright info for a video, or perform advanced search / filter operations, I suggest using the YouTube data API for this purpose, and then use youtube-dl to handle the downloading / transcoding. youtube-dl is impressive in its ability to extract metadata from webpages, but the data provided by the YouTube API will be more complete, and by using the API when possible you reduce the chance that YouTube will ban your IP, as you will be scraping fewer pages from their website.

I'm happy to assist further if you have questions in this area!

p-md commented 4 years ago

@samrahimi Thank you very much, I'll let you know if I have any other questions.

LubosKolouch commented 3 years ago

Can this be closed?