spotDL / spotify-downloader

Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
https://spotdl.readthedocs.io/en/latest/
MIT License
17.58k stars 1.61k forks source link

A small suggestion to remove "non-song" part #31

Closed Whacko23 closed 6 years ago

Whacko23 commented 7 years ago

Not that I am complaining but the downloaded songs also has conversation, intro and whatnot that is in the video. I was just wondering if you could figure out the length of the song in the spotify link. If yes then you can improve the code by first calculating the length of the song. Then trim extra length from the downloaded song from beginning of the file — not the end — since most songs have conversation, if they have any, in the beginning.

P.S. You must be annoyed right now. Please bear with me.

Whacko23 commented 7 years ago

On a side note, I got this warning. Just wondering if it is okay or not capture

ritiek commented 7 years ago

That's an awesome suggestion! I'm gonna look into it a few days hopefully when I am in a mood to tinker with stuff.

On a side note, I got this warning. Just wondering if it is okay or not

Don't worry about the warning, it uses ID3 version 2.3 otherwise tags in more recent versions are not detected by Windows Media Player. Look here 266586a2778f2cc2828079ed45699fe434ac5f14

P.S. You must be annoyed right now. Please bear with me.

Its all good to be honest. I'm actually happy if any part of this repo is helps you in any way :)

ritiek commented 7 years ago

Don't think this approach would work.

I just noticed that the length of the track on Spotify and YouTube may differ but that does not necessarily mean that there is "noise" in the beginning of the song on YouTube. In such tracks, it is the middle or end of the song that is made longer/shorter or some kind of remix..

We would be destroying a lot of such tracks if we were to implement this..

Whacko23 commented 7 years ago

I found acoustic fingerprinting scripts Dejavu and Echoprint. I think you can integrate them. If you did, add an attribute like --fingerprinting to enable the feature ( since most songs are already music-only.)

I would also like you to look into these spotify-friendly lyrics fetcher MusicNow and SpotifyLyrics . Thanks in advance

KLVN commented 7 years ago

Maybe prefer YouTube videos that have "(Official) Audio" in their title and compare their length. E.g.

Desiigner - Panda (4:02) [includes parts that don't belong to the song] Desiigner - Panda (Audio) (4:07) On Spotify (4:08)

And also check if the artists name is contained in the uploaders one (e.g. DesiignerVEVO) 😛

ritiek commented 6 years ago

The tool does try to match the song length now (and does a pretty well job). I think we should avoid matching the artist with the uploader's username. It will cause further problems as to how one of them (duration vs artist name) should be prioritized and won't be worth it IMO.

The fingerprinting thing might be nice too but I feel it is out of scope for this tool.

Closing this issue, since the tool now matches songs more accurately comparing the duration of song (as of #111, #121 and other small changes) than it used to before.