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.31k stars 1.6k forks source link

parts of audio missing #431

Closed willemgovaerts closed 5 years ago

willemgovaerts commented 5 years ago

What is the purpose of your issue?

Description

After downloading a spotify playlist some songs are broken. The song seems to sometimes jump ahead a few seconds. the .m4a file before the converting is fine, the problem only occurs after converting to mp3.

A song which shows this behavior is Trumpets by jason derulo. At about the 33th second the audio shifts a few seconds. The file is attached to this issue. (url: https://open.spotify.com/track/6jizk5lOUnfpaZXYMdfeC6)

Log

``` Cronus:test willemgovaerts$ sudo -H spotdl --list download.txt -f "/Users/willemgovaerts/Muziek/test" --log-level=DEBUG DEBUG: Python version: 3.6.0 (default, Dec 24 2016, 08:01:42) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] DEBUG: Platform: Darwin-16.7.0-x86_64-i386-64bit DEBUG: {'album': None, 'all_albums': None, 'avconv': False, 'config': None, 'download_only_metadata': False, 'dry_run': False, 'file_format': '{artist} - {track_name}', 'folder': '/Users/willemgovaerts/Muziek/test', 'input_ext': '.m4a', 'list': 'download.txt', 'log_level': 10, 'manual': False, 'music_videos_only': False, 'no_metadata': False, 'no_spaces': False, 'output_ext': '.mp3', 'overwrite': 'prompt', 'playlist': None, 'search_format': '{artist} - {track_name} lyrics', 'skip': None, 'song': None, 'trim_silence': False, 'username': None, 'version': False, 'write_m3u': False, 'write_successful': None, 'youtube_api_key': None} INFO: Checking and removing any duplicate tracks INFO: Preparing to download 1 songs DEBUG: Fetching metadata for given track URL DEBUG: Fetching lyrics DEBUG: {'album': {'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/07YZf4WDAMNwqr4jfgOZ8y'}, 'href': 'https://api.spotify.com/v1/artists/07YZf4WDAMNwqr4jfgOZ8y', 'id': '07YZf4WDAMNwqr4jfgOZ8y', 'name': 'Jason Derulo', 'type': 'artist', 'uri': 'spotify:artist:07YZf4WDAMNwqr4jfgOZ8y'}], 'external_urls': {'spotify': 'https://open.spotify.com/album/1OdcBxCNY52OXH0r4odXqP'}, 'href': 'https://api.spotify.com/v1/albums/1OdcBxCNY52OXH0r4odXqP', 'id': '1OdcBxCNY52OXH0r4odXqP', 'images': [{'height': 640, 'url': 'https://i.scdn.co/image/9bd7efde3071d2dfc44752f7ab61a4eba261c883', 'width': 640}, {'height': 300, 'url': 'https://i.scdn.co/image/4fdfd1f458b2716244edce8f2c3d4dc850edc5c7', 'width': 300}, {'height': 64, 'url': 'https://i.scdn.co/image/3dc4697d740ec795c3525004623645719caacebd', 'width': 64}], 'name': 'Tattoos', 'release_date': '2013-09-10', 'release_date_precision': 'day', 'total_tracks': 11, 'type': 'album', 'uri': 'spotify:album:1OdcBxCNY52OXH0r4odXqP'}, 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/07YZf4WDAMNwqr4jfgOZ8y'}, 'href': 'https://api.spotify.com/v1/artists/07YZf4WDAMNwqr4jfgOZ8y', 'id': '07YZf4WDAMNwqr4jfgOZ8y', 'name': 'Jason Derulo', 'type': 'artist', 'uri': 'spotify:artist:07YZf4WDAMNwqr4jfgOZ8y'}], 'copyright': '2013 Warner Bros. Records Inc.', 'disc_number': 1, 'duration': 217.306, 'explicit': False, 'external_ids': {'isrc': 'USWB11303249'}, 'external_urls': {'spotify': 'https://open.spotify.com/track/6jizk5lOUnfpaZXYMdfeC6'}, 'genre': 'Dance Pop', 'href': 'https://api.spotify.com/v1/tracks/6jizk5lOUnfpaZXYMdfeC6', 'id': '6jizk5lOUnfpaZXYMdfeC6', 'is_local': False, 'lyrics': 'Every time that you get undressed\n' 'I hear symphonies in my head\n' 'I wrote this song just looking at you oh, oh\n' 'Yet the drums they swing low\n' 'And the trumpets they go\n' '\n' 'Da da, da ra ra da, da, da\n' 'Da, ra, ra, ra, da, da\n' 'Da da, da ra ra da, da, da\n' 'Da, ra, ra, ra, da, da\n' 'They go\n' '\n' 'Is it weird that I hear\n' "Violins whenever you're gone?\n" "Whenever you're gone\n" 'Is it weird that your ass\n' 'Remind me of a Kanye West song?\n' 'Kanye West song\n' 'Is it weird that I hear\n' "Trumpets when you're turning me on?\n" 'Turning me on\n' 'Is it weird that your bra\n' 'Remind me of a Katy Perry song?\n' '\n' 'Every time that you get undressed\n' 'I hear symphonies in my head\n' 'I wrote this song just looking at you oh, oh\n' 'Yet the drums they swing low\n' 'And the trumpets they go\n' 'And the trumpets they go\n' 'Yeah the trumpets they go\n' '\n' 'Da da, da ra ra da, da, da\n' 'Da, ra, ra, ra, da, da\n' 'Da da, da ra ra da, da, da\n' 'Da, ra, ra, ra, da, da\n' 'They go\n' '\n' 'Is it weird that I hear\n' 'Angels every time that you moan?\n' 'Time that you moan\n' 'Is it weird that your eyes\n' 'Remind me of a Coldplay song?\n' 'Coldplay song\n' 'Is it weird that I hear\n' "Trumpets when you're turning me on?\n" 'Turning me on\n' '\n' 'Every time that you get undressed\n' 'I hear symphonies in my head\n' 'I wrote this song just looking at you oh, oh\n' 'Yet the drums they swing low\n' 'And the trumpets they go\n' 'And the trumpets they go\n' 'Yeah the trumpets they go\n' '\n' 'Da da, da ra ra da, da, da\n' 'Da, ra, ra, ra, da, da\n' 'Da da, da ra ra da, da, da\n' 'Da, ra, ra, ra, da, da\n' 'They go', 'name': 'Trumpets', 'popularity': 70, 'preview_url': 'https://p.scdn.co/mp3-preview/95ef25ebe8621f4c670cefe3e16a40d0fee759ac?cid=4fe3fecfe5334023a1472516cc99d805', 'publisher': 'Beluga Heights/Warner Bros.', 'release_date': '2013-09-10', 'total_tracks': 11, 'track_number': 5, 'type': 'track', 'uri': 'spotify:track:6jizk5lOUnfpaZXYMdfeC6', 'year': '2013'} DEBUG: Opening URL: https://www.youtube.com/results?sp=EgIQAQ%253D%253D&q=Jason%20Derulo%20-%20Trumpets%20lyrics INFO: 1. Jason Derulo - Trumpets (Lyrics) (http://www.youtube.com/watch?v=TdzpejfXtdQ) DEBUG: Refining songname from "Jason Derulo - Trumpets (Lyrics)" to "Jason Derulo - Trumpets" DEBUG: Cleaning any temp files and checking if "Jason Derulo - Trumpets" already exists DEBUG: Downloading from URL: https://r4---sn-5hne6nsk.googlevideo.com/videoplayback?ei=MfHrW4aVBpbI7gORhZigBw&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1538083592096394&gir=yes&dur=224.490&fvip=4&initcwndbps=1510000&c=WEB&itag=140&clen=3566136&txp=5533332&keepalive=yes&key=yt6&ipbits=0&expire=1542210961&mt=1542189235&mv=m&id=o-AMK4Bum7NK4pRzJXasSh5q8PnPgdn54pHeMHxUruJ_Hv&ms=au%2Crdu&mm=31%2C29&source=youtube&pl=33&mn=sn-5hne6nsk%2Csn-5hnekn7z&mime=audio%2Fmp4&ip=2a02%3A1811%3Ad10%3A3d00%3A9a3%3A1f55%3A3d1a%3Ad369&requiressl=yes&signature=683F4ADF038236482724A1F3CB169B9B0D09706D.9BB1C83EC7C7556E8C0F92879246AD12B1C7BBB4&ratebypass=yes DEBUG: Saving to: /Users/willemgovaerts/Muziek/test/Jason Derulo - Trumpets.m4a 3,566,136 Bytes [100.00%] received. Rate: [7979 KB/s]. ETA: [0 secs] INFO: Converting Jason Derulo - Trumpets.m4a to mp3 DEBUG: ['ffmpeg', '-y', '-i', '/Users/willemgovaerts/Muziek/test/Jason Derulo - Trumpets.m4a', '-codec:v', 'copy', '-codec:a', 'libmp3lame', '-ar', '44100', '-b:a', '192k', '-vn', '/Users/willemgovaerts/Muziek/test/Jason Derulo - Trumpets.mp3'] ffmpeg version 4.0.1 Copyright (c) 2000-2018 the FFmpeg developers built with Apple LLVM version 9.0.0 (clang-900.0.39.2) configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat 58. 12.100 / 58. 12.100 libavdevice 58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 libpostproc 55. 1.100 / 55. 1.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/willemgovaerts/Muziek/test/Jason Derulo - Trumpets.m4a': Metadata: major_brand : dash minor_version : 0 compatible_brands: iso6mp41 creation_time : 2018-09-27T21:26:32.000000Z Duration: 00:03:44.49, start: 0.000000, bitrate: 127 kb/s Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 5 kb/s (default) Metadata: creation_time : 2018-09-27T21:26:32.000000Z handler_name : SoundHandler Stream mapping: Stream #0:0 -> #0:0 (aac (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to '/Users/willemgovaerts/Muziek/test/Jason Derulo - Trumpets.mp3': Metadata: major_brand : dash minor_version : 0 compatible_brands: iso6mp41 TSSE : Lavf58.12.100 Stream #0:0(eng): Audio: mp3 (libmp3lame), 44100 Hz, stereo, fltp, 192 kb/s (default) Metadata: creation_time : 2018-09-27T21:26:32.000000Z handler_name : SoundHandler encoder : Lavc58.18.100 libmp3lame size= 5263kB time=00:03:44.49 bitrate= 192.0kbits/s speed=30.1x video:0kB audio:5262kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.014178% INFO: Applying metadata DEBUG: Adding downloaded song to write successful file DEBUG: Removing downloaded song from tracks file Cronus:test willemgovaerts$ ```


Jason Derulo - Trumpets.mp3.zip

ritiek commented 5 years ago

I can't seem to reproduce this problem either with the attached .mp3 or after downloading from the URL. No audio shifts anywhere in the track for me.

What are you using to play the music files? Does the audio shift with some other player as well?

ritiek commented 5 years ago

Closing due to inactivity.