SathyaBhat / spotify-dl

Downloads songs from your Spotify Playlist
http://sathyasays.com/2015/12/29/spotify-dl-download-your-spotify-my-music-songs-as-mp3/
MIT License
1.69k stars 209 forks source link

Issue converting some songs to MP3 with docker only #199

Open makew0rld opened 2 years ago

makew0rld commented 2 years ago

Describe the bug

When downloading the song Locket by Crumb, only the .webm is downloaded, and it is never converted to MP3. See these logs from docker:

[download] Downloading playlist: Crumb - Locket Lyrics
[youtube:search] query "Crumb - Locket Lyrics": Downloading page 1
[youtube:search] playlist Crumb - Locket Lyrics: Downloading 1 videos
[download] Downloading video 1 of 1
[download] Locket - Crumb (Lyrics) has already been recorded in archive
[download] Finished downloading playlist: Crumb - Locket Lyrics
[download] Downloading playlist: Pond - Paint Me Silver Lyrics
Failed to download: Crumb - Locket Lyrics, please ensure YouTubeDL is up-to-date. 

When running outside of docker, these logs are produced and there is only an MP3 file:

[download] Downloading playlist: Crumb - Locket Lyrics
[youtube:search] query "Crumb - Locket Lyrics": Downloading page 1
[youtube:search] playlist Crumb - Locket Lyrics: Downloading 1 videos
[download] Downloading video 1 of 1
[youtube] X2bQnrmRbWo: Downloading webpage
[youtube] Downloading just video X2bQnrmRbWo because of --no-playlist
[youtube] X2bQnrmRbWo: Downloading MPD manifest
[download] Destination: My Playlist/Crumb - Locket.webm
[download] 100% of 5.39MiB in 00:00
[ffmpeg] Destination: My Playlist/Crumb - Locket.mp3
Deleting original file My Playlist/Crumb - Locket.webm (pass -k to keep)
[download] Finished downloading playlist: Crumb - Locket Lyrics

To Reproduce

docker run -d --rm \
           -e SPOTIPY_CLIENT_ID=client_id \
           -e SPOTIPY_CLIENT_SECRET=client_secret \
           -v "`pwd`":/download \
           spotify_dl \
           spotify_dl -l "spotify_playlist_link" -o /download

vs

spotify_dl -l playlist_link -o . -s yes

Just use any playlist with Crumb - Locket in it.

Expected behavior

Docker and non-docker act the same, and both produce MP3 files at the end.

Desktop (please complete the following information):

Hopefully you can figure out why this happens. It'd also be nice to update the docker container to use python:3.9-slim as the base instead of 3.8.

0scvr commented 2 years ago

Can confirm. Having this issue as well with Docker.

m1ser4ble commented 1 month ago

To convert song to mp3 format, yt-dlp package requires ffmpeg package to be installed. In my case, the problem resolved after installing it