casualsnek / onthespot

qt based music downloader written in python
GNU General Public License v2.0
941 stars 79 forks source link

[BUG] unable to download in .mp3 #149

Open sys-admn-ploopy opened 3 months ago

sys-admn-ploopy commented 3 months ago

Describe the bug As the title says, I am unable to download filed in .mp3 files, with the downloads failing after max retries. Downloading in "raw format" works okay, but it would be nice to have song metadata/ album art... Not sure if I am doing something wrong on my end

I do have ffmpeg downloaded to PATH but it doesn't seem to be recognized:

[2024-08-19 22:30:50,789 :: worker.downloader.SESSION_DL_TH-a :: worker/downloader.py -> 222:      download_track() :: ERROR] -> Download failed for track by id '2cDCojn6uIBM6A5xTAbl3H', Unexpected error: Traceback (most recent call last):
  File "worker/downloader.py", line 168, in download_track
  File "utils/spotify.py", line 217, in convert_audio_format
  File "subprocess.py", line 408, in check_call
  File "subprocess.py", line 389, in call
  File "subprocess.py", line 1024, in __init__
  File "subprocess.py", line 1901, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
 !

for reference, my output for brew install ffmpeg:

➜  ~ brew install ffmpeg
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################### 100.0%
Warning: ffmpeg 7.0.2 is already installed and up-to-date.
To reinstall 7.0.2, run:
  brew reinstall ffmpeg

Would appreciate any advice! tbh I may have downloaded ffmpeg incorrectly tbh...

System Information:

Additional context

justin025 commented 3 months ago

How did you get it to run on iOS lmao

sys-admn-ploopy commented 3 months ago

How did you get it to run on iOS lmao

Oops, I meant MacOS lol

justin025 commented 3 months ago

I was looking at releases and cant seem to find a macos build, I'm assuming you built it yourself? If that is the case try embedding the following binaries. Create a folder titled 'ffbin_mac' and place ffmpeg ffprobe and ffplay in the directory. Here is the build script for reference, https://github.com/casualsnek/onthespot/blob/main/build_mac.sh

If you have trouble with this I could build you a binary when I get a chance.