Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare song lengths #81

Open
lucanello opened this issue May 18, 2020 · 4 comments
Open

Compare song lengths #81

lucanello opened this issue May 18, 2020 · 4 comments
Assignees

Comments

@lucanello
Copy link
Contributor

Currently, there is no comparison if the found YouTube video matches the song. The only similarities are the song title and search query for YouTube.

There should be a feature added which makes sure that the found YouTube video is the right song. This feature has also been mentioned in #39. But the suggested solution of using NLP for comparing the song title with the video title seems extremely hard to implement for a quite small improvement - because videos could only contain the song title and therefore be a false positive.

An easier way to implement a feature which makes sure the right video is selected could be a comparator between the song and video length. The video should always be about the same length as the song, otherwise something is wrong. There could be a variable which can be modified and tells how many percent the video length can be off. That reduces the risk of false positives (sometimes there are intros and outros added to the YouTube videos).

E.g.: max_length_difference = 0.1 -> A song on Spotify with 3 minutes (= 180 seconds) playtime has to be within the range of 162 seconds to 198 seconds video length.

Informations like the Spotify song length can be extracted from the API, as well as the video length from the HTML and/or the YouTube API.

@SathyaBhat
Copy link
Owner

SathyaBhat commented May 19, 2020

@lucanello adding you as the assignee - if not let me know

@last72
Copy link

last72 commented Oct 6, 2020

Agreed. I was thinking to manually find the YouTube videos and input to provide best result. We are in same boat in whole.

@Fabian42
Copy link

Example to reproduce:
Title: "Beautiful people"
Artist: "Thomas Bergersen" (together with Merethe Soltvedt)
Spotify link: https://open.spotify.com/track/4L2cTneQccxklpCcX0BboM
Duration: 4m57s

Spotify_dl downloads this YouTube video: https://www.youtube.com/watch?v=iTsz5x3abJA
Title: "Thomas Bergersen - We Are One Beautiful People" on the channel "Two Steps From Hell"
Duration: 6m47s
The channel is correct, it's one of the official ones, but the track is not correct, it's a mix between "We are one" and "Beautiful people". I don't know why spotify_dl picked this one. There is a shortened URL to the Spotify album in the video description, but that's the only connection. I don't know how spotify_dl would know that it's the correct channel.

There is this fan-made video that seems to contain the original audio: https://www.youtube.com/watch?v=FNUxeUsaRCY
Duration: 4m58s
It's the first result for the search that spotify_dl uses, but by some metric it chooses the other one instead. I have not verified yet whether the track is actually exactly the same, has the best audio quality, etc.

@patrlim
Copy link

patrlim commented Sep 28, 2024

Odd Chap - Maths
Jamie Berry - Make Me Believe

these tracks also consistently get the wrong download, with Maths, a 3 minute track, downloading a track that's 45 minutes long!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants