spotify-downloader: FFmpegError: Failed to convert
TEMPORARY FIX HERE: https://github.com/spotDL/spotify-downloader/issues/2342#issuecomment-2753561082
System OS
Windows
Python Version
3.13 (CPython)
Install Source
pip / PyPi
Install version / commit hash
v4.2.11
Expected Behavior vs Actual Behavior
I download the song, it downloads halfway. But then the moment it starts the conversion process it shows the error. I tried updating FFMPEG, Python, SPOTDL and even the confog.json file with the spotify dev option, nothing works (P.S. i am a little new to all this stuff so please forgive any newbie mistakes)
Steps to reproduce - Ensure to include actual links!
### return_code:
4294967274
### arguments:
['-nostdin', '-y', '-i', 'C:\\Users\\aashi\\.spotdl\\temp\\ugD3_yt756w.mp4', '-movflags', '+faststart', '-v', 'debug', '-progress', '-', '-nostats', '-codec:a', 'libmp3lame', '-b:a', 'copy', "D:\\SPOTDL\\2Pac, Outlawz - Hit 'Em Up - Single Version.mp3"]
### ffmpeg:
ffmpeg
### version:
2025.0
### build_year:
2025
### error:
ffmpeg version 2025-03-24-git-cbbc927a67-full_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 14.2.0 (Rev1, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-lcms2 --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-liblc3 --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 59. 60.100 / 59. 60.100
libavcodec 61. 33.102 / 61. 33.102
libavformat 61. 9.107 / 61. 9.107
libavdevice 61. 4.100 / 61. 4.100
libavfilter 10. 9.100 / 10. 9.100
libswscale 8. 13.103 / 8. 13.103
libswresample 5. 4.100 / 5. 4.100
libpostproc 58. 4.100 / 58. 4.100
Splitting the commandline.
Reading option '-nostdin' ... matched as option 'stdin' (enable or disable interaction on standard input) with argument 0.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-i' ... matched as input url with argument 'C:\Users\aashi\.spotdl\temp\ugD3_yt756w.mp4'.
Reading option '-movflags' ... matched as AVOption 'movflags' with argument '+faststart'.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-progress' ... matched as option 'progress' (write program-readable progress information) with argument '-'.
Reading option '-nostats' ... matched as option 'stats' (print progress report during encoding) with argument 0.
Reading option '-codec:a' ... matched as option 'codec' (alias for -c (select encoder/decoder)) with argument 'libmp3lame'.
Reading option '-b:a' ... matched as option 'b' (video bitrate (please use -b:v)) with argument 'copy'.
Reading option 'D:\SPOTDL\2Pac, Outlawz - Hit 'Em Up - Single Version.mp3' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option nostdin (enable or disable interaction on standard input) with argument 0.
Applying option y (overwrite output files) with argument 1.
Applying option v (set logging level) with argument debug.
Applying option progress (write program-readable progress information) with argument -.
[pipe @ 000001e4742dd640] Setting default whitelist 'crypto,data'
Applying option nostats (print progress report during encoding) with argument 0.
Successfully parsed a group of options.
Parsing a group of options: input url C:\Users\aashi\.spotdl\temp\ugD3_yt756w.mp4.
Successfully parsed a group of options.
Opening an input file: C:\Users\aashi\.spotdl\temp\ugD3_yt756w.mp4.
[AVFormatContext @ 000001e4742f7500] Opening 'C:\Users\aashi\.spotdl\temp\ugD3_yt756w.mp4' for reading
[file @ 000001e4742f7b80] Setting default whitelist 'file,crypto,data'
[aac @ 000001e4742f7500] Format aac probed with size=2048 and score=51
id3v2 ver:3 flags:00 len:63
[aac @ 000001e4742f7500] Before avformat_find_stream_info() pos: 73 bytes read:65696 seeks:4 nb_streams:1
Transform tree:
mdct_pfa_3xM_inv_float_c - type: mdct_float, len: 96, factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only]
fft16_ns_float_fma3 - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
Transform tree:
mdct_inv_float_avx2 - type: mdct_float, len: 120, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: 60, factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call]
fft4_fwd_asm_float_sse2 - type: fft_float, len: 4, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
Transform tree:
mdct_inv_float_avx2 - type: mdct_float, len: 128, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
fft_sr_asm_float_avx2 - type: fft_float, len: 64, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
Transform tree:
mdct_inv_float_avx2 - type: mdct_float, len: 480, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: 240, factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call]
fft16_asm_float_fma3 - type: fft_float, len: 16, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
Transform tree:
mdct_inv_float_avx2 - type: mdct_float, len: 512, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
fft_sr_asm_float_avx2 - type: fft_float, len: 256, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
Transform tree:
mdct_pfa_3xM_inv_float_c - type: mdct_float, len: 768, factors[2]: [3, any], flags: [unaligned, out_of_place, inv_only]
fft_sr_ns_float_avx2 - type: fft_float, len: 128, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
Transform tree:
mdct_inv_float_avx2 - type: mdct_float, len: 960, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
fft_pfa_15xM_asm_float_avx2 - type: fft_float, len: 480, factors[2]: [15, 2], flags: [aligned, inplace, out_of_place, preshuf, asm_call]
fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
Transform tree:
mdct_inv_float_avx2 - type: mdct_float, len: 1024, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
fft_sr_asm_float_avx2 - type: fft_float, len: 512, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
Transform tree:
mdct_fwd_float_c - type: mdct_float, len: 1024, factors[2]: [2, any], flags: [unaligned, out_of_place, fwd_only]
fft_sr_ns_float_avx2 - type: fft_float, len: 512, factor: 2, flags: [aligned, inplace, out_of_place, preshuf]
Transform tree:
mdct_inv_float_avx2 - type: mdct_float, len: 64, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
Transform tree:
mdct_inv_float_avx2 - type: mdct_float, len: 64, factors[2]: [2, any], flags: [aligned, out_of_place, inv_only]
fft32_asm_float_fma3 - type: fft_float, len: 32, factor: 2, flags: [aligned, inplace, out_of_place, preshuf, asm_call]
[aac @ 000001e4742f7500] All info found
[aac @ 000001e4742f7500] Estimating duration from bitrate, this may be inaccurate
[aac @ 000001e4742f7500] After avformat_find_stream_info() pos: 19688 bytes read:65696 seeks:4 frames:50
Input #0, aac, from 'C:\Users\aashi\.spotdl\temp\ugD3_yt756w.mp4':
Metadata:
id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x03\x92
Duration: 00:05:01.83, bitrate: 135 kb/s
Stream #0:0, 50, 1/28224000: Audio: aac (LC), 44100 Hz, stereo, fltp, 135 kb/s
Successfully opened the file.
Parsing a group of options: output url D:\SPOTDL\2Pac, Outlawz - Hit 'Em Up - Single Version.mp3.
Applying option codec:a (alias for -c (select encoder/decoder)) with argument libmp3lame.
Applying option b:a (video bitrate (please use -b:v)) with argument copy.
Successfully parsed a group of options.
Opening an output file: D:\SPOTDL\2Pac, Outlawz - Hit 'Em Up - Single Version.mp3.
[out#0/mp3 @ 000001e4742f7980] No explicit maps, mapping streams automatically...
[aost#0:0/libmp3lame @ 000001e474348700] Created audio stream from input stream 0:0
[libmp3lame @ 000001e4743096c0] [Eval @ 000000751e9fd2b0] Undefined constant or missing '(' in 'copy'
[libmp3lame @ 000001e4743096c0] Unable to parse option value "copy"
[libmp3lame @ 000001e4743096c0] Error setting option b to value copy.
[aost#0:0/libmp3lame @ 000001e474348700] Error applying encoder options: Invalid argument
Error opening output file D:\SPOTDL\2Pac, Outlawz - Hit 'Em Up - Single Version.mp3.
Error opening output files: Invalid argument
[AVIOContext @ 000001e4742f7dc0] Statistics: 65696 bytes read, 4 seeks
Traceback
Using cached web app. To update use the `--force-update-gui` flag.
Files are stored in current directory to save them to temporary directory disable the `web_use_output_dir` option
Starting web server
INFO: Started server process [18260]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://localhost:8800 (Press CTRL+C to quit)
INFO: ::1:51006 - "GET / HTTP/1.1" 200 OK
INFO: ::1:51006 - "GET /assets/index-CqL-qAH-.js HTTP/1.1" 200 OK
INFO: ::1:51007 - "GET /assets/index-DRB2_ZPb.css HTTP/1.1" 200 OK
INFO: ('::1', 51008) - "WebSocket /api/ws?client_id=a50c27d6-749e-44e9-8daa-12bf867960f7" [accepted]
INFO: Client a50c27d6-749e-44e9-8daa-12bf867960f7 connected
INFO: connection open
INFO: ::1:51007 - "GET /api/version HTTP/1.1" 200 OK
INFO: ::1:51006 - "GET /api/settings?client_id=a50c27d6-749e-44e9-8daa-12bf867960f7 HTTP/1.1" 200 OK
INFO: ::1:51006 - "GET /api/songs/search?query=tupac HTTP/1.1" 200 OK
2Pac - Hit 'Em Up - Single Version: Downloading
1/0 complete
FFmpegError: Failed to convert 2Pac - Hit 'Em Up - Single Version, you can find error here:
C:\Users\aashi\.spotdl\errors\ffmpeg_error_2025-03-26-10-29-41.txt
ERROR: Failure downloading Hit 'Em Up - Single Version
ERROR: Error downloading!
INFO: ::1:51006 - "POST /api/download/url?url=https:%2F%2Fopen.spotify.com%2Ftrack%2F0Z2J91b2iTGLVTZC4fKgxf&client_id=a50c27d6-749e-44e9-8daa-12bf867960f7 HTTP/1.1" 500 Internal Server Error
Other details
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 7
- Comments: 27
Hey, update to this issue, I was able to get spotdl working again on my computer without changing any code. I believe spotdl automatically chooses a bitrate to download at or it may be set at something by default (didn’t really look at the code but just a guess). Whenever I run the spotdl command where I manually set the bit rate to 192k for example, it worked for me.
Try this command: spotdl --bitrate 192k [spotify url here]
I faced the same issue, and while adding “
--bitrate 320k” directly to the terminal while downloading an album or song worked fine, adding it to the config file did nothing (neither did 128k, 256k etc). I checked the yt-dlp version installed, and it was an older version (2025.1.15), which was installed through pip. It did however tell me that version 2025.3.27 was available but it couldn’t update.The first and easiest thing then is to uninstall and re-install yt-dlp. I don’t usually install yt-dlp through pip, so I assumed that spotdl had installed it, but then I also recalled that I have installed it myself through APT on a much earlier occasion.
Suspecting that I had a second yt-dlp install, I typed
yt-dlp --version, just to see if there’s a second installation and it told me that yes, version 2024.09.27 was installed!So I uninstalled it through APT, then I installed it through pip again, and it fetched the latest version (2025.3.27), instead of 2025.1.15. After that it works perfectly fine again!
TL;DR: YT-DLP is very outdated and can’t update due to TWO seperate installs. While the 128k bitrate “hack” works fine for some people, it’s not actually solving the issue. Getting yt-dlp up to date is solving the issue.
Solution on Ubuntu/Linux:
pip uninstall yt-dlp--break-system-packages (add this part if you get an error)sudo apt remove yt-dlppip install yt-dlp--break-system-packages (add this part if you get an error)Thanks @bkeen2021 , that seems like a better solution than editing the file manually, however look at this part from the spotdl docs, just to let you know.
worked for me too ,<3<3<3 on windows: pip uninstall yt-dlp y pip install yt-dlp
yeh I think open in web won’t fix anything ,u need to change the configuration. it should be in C:\ users\ {urname}\ .spotdl\ config.json (doc: https://spotdl.github.io/spotify-downloader/usage/#config-file) Hence I think this issue can considered be closed
I just made a solution , you just need to open the web app on command
Run on Cmd: Spotdl web
And download was working fine
I’m facing the same problem. The
bitrate fixmentioned a few comments above doesn’t work. I don’t have yt premium.I’ll be following this issue closely. Here’s some information to the developer of spotdl and other contributors.
An attempt to download a song, alongside the error.txt
The track u download is located at where u execute spotdl command For example if u execute at “D:\music” , it’s at “D:\music”
Btw just found a solution in earlier issues: https://github.com/spotDL/spotify-downloader/issues/2339#issuecomment-2751312324 & https://github.com/spotDL/spotify-downloader/issues/2333#issuecomment-2749133145