4 ms·
Apologies for a slightly off-topic question, but people discussing tone are probably the ones with an answer! I have a series of "mixtape" mp3 files and I'd li
by k2enemy 3y ago
Apologies for a slightly off-topic question, but people discussing tone are probably the ones with an answer!
I have a series of "mixtape" mp3 files and I'd like to generate a list of the songs within the one long file. I'm aware of musicbrainz, but is there anything that works on a single file with multiple songs? Perhaps my best bet is to generate 10 second long files sampled every two minutes, then run the fingerprinting on those individual files?
- sandreas 3y agoYou could try to perform a silence detection, if there is a silence after every song. https://stackoverflow.com/questions/42507879/how-to-detect-the-silence-at-the-end-of-an-audio-file https://stackoverflow.com/questions/42507879/how-to-detect-t... ffmpeg -i audio.mp3 -af silencedetect=n=-50dB:d=0.5 -f null - 2>&1 # -50dB is the threshold for detecting audio as a silence # 0.5 means the silences must at least have a duration of 0.5 seconds In your case I would try: ffmpeg -i audio.mp3 -af silencedetect=n=-30dB:d=2.5 -f null - 2>&1 That should give you a pretty accurate list of where the songs begin and end... that way, you can extract the songs and run fingerprinting. After this, you could use the ability of `tone` to add `chapters` to audio files (for mp3 it is id3v2 chapter addendum, see https://mutagen-specs.readthedocs.io/en/latest/id3/id3v2-chapters-1.0.html https://mutagen-specs.readthedocs.io/en/latest/id3/id3v2-cha...) to have at least marks for each track as title. MP3 chapters will not be recognized by most players, but at least it is within the specs.
- thedaly 3y agoTypically a mixtape is a continuous mix with no song breaks. If that is the case, track lists are using listed where the mix is posted, mixcloud, etc.
- majkinetor 3y agoThat may be impossible because in the mix, songs may be played with different speed so no detection app that I know will find them. Otherwise, you could play a mixtape and put shazam in the background to see if it will find the songs (it can do that continiously). If it can, then you can easily automate file splitting using ffmpeg and powershell and grabbing a list using GUI/CLI automation via shazam desktop or somethig like https://audd.io https://audd.io.