casualsnek / onthespot

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

Download failing MacOS ffprobe #34

Open Norvoke opened 1 year ago

Norvoke commented 1 year ago

Had the below issues while trying to download any given song. It seems like it can't find ffprobe or ffmpeg, despite the fact that the two unix executables are in the /onthespot directory. I'm not too sure what I'm doing wrong as everything else in the program seems to work well, but I tried to include the terminal log from launching the program. Also included a screenshot of the /onthespot directory.

[2022-11-17 14:17:11,200 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 80: init() :: INFO] -> Initialising main window [2022-11-17 14:17:11,200 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 95: init() :: INFO] -> Loading configurations.. [2022-11-17 14:17:11,200 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 466: fill_configs() :: INFO] -> Config filled to UI [2022-11-17 14:17:11,200 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 107: init() :: INFO] -> Preparing session loader [2022-11-17 14:17:11,201 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 119: init() :: INFO] -> Preparing parsing queue processor [2022-11-17 14:17:11,201 :: /Users/finnellingwood/onthespot/worker/session.py -> 17: run() :: INFO] -> Session loader has started ! [2022-11-17 14:17:11,201 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 163: set_table_props() :: INFO] -> Setting table item properties [2022-11-17 14:17:11,201 :: /Users/finnellingwood/onthespot/worker/utility.py -> 80: run() :: INFO] -> Parsing queue processor is active ! [2022-11-17 14:17:11,201 :: /Users/finnellingwood/onthespot/worker/session.py -> 23: run() :: INFO] -> Trying to create session for zvmn [2022-11-17 14:17:11,201 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 135: init() :: INFO] -> Main window init completed ! [2022-11-17 14:17:11,407 :: /Users/finnellingwood/onthespot/utils/utils.py -> 18: login_user() :: INFO] -> logging in user 'zvmn@.*' [2022-11-17 14:17:11,407 :: /Users/finnellingwood/onthespot/utils/utils.py -> 24: login_user() :: INFO] -> Session file exists for user, attempting to use it 'zvmn@.*' [2022-11-17 14:17:13,216 :: /Users/finnellingwood/onthespot/utils/utils.py -> 35: login_user() :: INFO] -> Login successful for user 'zvmn@.***' [2022-11-17 14:17:13,429 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 381:generate_users_table() :: INFO] -> Accounts table was populated ! [2022-11-17 14:17:13,460 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 385: rebuild_threads() :: INFO] -> Building downloader.py threads [2022-11-17 14:17:13,460 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 387: __rebuild_threads() :: WARNING] -> Session pool not empty ! Reset not implemented [2022-11-17 14:17:13,460 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 390: rebuild_threads() :: INFO] -> Spawning 4 downloaders ! [2022-11-17 14:17:13,460 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 400: rebuild_threads() :: INFO] -> Spawning DL WORKER 1 using session_index: 0 [2022-11-17 14:17:13,461 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 400: rebuild_threads() :: INFO] -> Spawning DL WORKER 2 using session_index: 0 [2022-11-17 14:17:13,461 :: /Users/finnellingwood/onthespot/worker/downloader.py -> 242: run() :: INFO] -> Download worker DL WORKER 1 is running [2022-11-17 14:17:13,461 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 400: rebuild_threads() :: INFO] -> Spawning DL WORKER 3 using session_index: 0 [2022-11-17 14:17:13,461 :: /Users/finnellingwood/onthespot/worker/downloader.py -> 242: run() :: INFO] -> Download worker DL WORKER 2 is running [2022-11-17 14:17:13,461 :: /Users/finnellingwood/onthespot/worker/downloader.py -> 242: run() :: INFO] -> Download worker DL WORKER 3 is running [2022-11-17 14:17:13,461 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 400: rebuild_threads() :: INFO] -> Spawning DL WORKER 4 using session_index: 0 [2022-11-17 14:17:13,462 :: /Users/finnellingwood/onthespot/worker/downloader.py -> 242: run() :: INFO] -> Download worker DL WORKER 4 is running 2022-11-17 14:17:14.533 Python[16211:104199] TSM AdjustCapsLockLEDForKeyTransitionHandling - _ISSetPhysicalKeyboardCapsLockLED Inhibit [2022-11-17 14:17:15,081 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 563:__get_search_results() :: INFO] -> Search clicked with value term aha [2022-11-17 14:17:15,083 :: /Users/finnellingwood/onthespot/utils/spotify.py -> 181: search_by_term() :: INFO] -> Get search result for term 'aha', max items '10' [2022-11-17 14:17:16,787 :: /Users/finnellingwood/onthespot/worker/utility.py -> 63: enqueue_tracks() :: INFO] -> PQP parsing Take on Me:2WfaOiMkCvy7F5fcp2zZ8L <-> track item: Take on Me:2WfaOiMkCvy7F5fcp2zZ8L [2022-11-17 14:17:16,805 :: /Users/finnellingwood/onthespot/gui/mainui.py -> 309:add_item_to_downloads() :: INFO] -> Adding item to download queue -> media_type:track, media_id: 2WfaOiMkCvy7F5fcp2zZ8L, extra_path:, extra_path_as_root: False, Prefix value: '' [2022-11-17 14:17:16,805 :: /Users/finnellingwood/onthespot/worker/downloader.py -> 248: run() :: INFO] -> Processing download for track by id '2WfaOiMkCvy7F5fcp2zZ8L', Attempt: 0 [2022-11-17 14:17:21,201 :: /Users/finnellingwood/onthespot/worker/downloader.py -> 128: download_track() :: WARNING] -> Force raw is disabled for track by id '2WfaOiMkCvy7F5fcp2zZ8L', media converting and tagging will be done ! [2022-11-17 14:17:21,202 :: /Users/finnellingwood/onthespot/utils/spotify.py -> 129:convert_audio_format() :: INFO] -> Audiosegment media at '/Users/finnellingwood/Music/OnTheSpot/a-ha/[1985] Hunting High and Low/a-ha - Hunting High and Low - Take on Me.mp3' [2022-11-17 14:17:21,231 :: /Users/finnellingwood/onthespot/worker/downloader.py -> 185: download_track() :: ERROR] -> Download failed for track by id '2WfaOiMkCvy7F5fcp2zZ8L', Unexpected error: Traceback (most recent call last): File "/Users/finnellingwood/onthespot/worker/downloader.py", line 133, in download_track convert_audio_format(filename, quality) File "/Users/finnellingwood/onthespot/utils/spotify.py", line 131, in convert_audio_format raw_audio = AudioSegment.from_file(os.path.abspath(filename), format="ogg", File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pydub/audio_segment.py", line 728, in from_file info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pydub/utils.py", line 274, in mediainfo_json res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe' ! [2022-11-17 14:17:21,232 :: /Users/finnellingwood/onthespot/worker/downloader.py -> 279: run() :: ERROR] -> Download process returned false: 2WfaOiMkCvy7F5fcp2zZ8L

Screen Shot 2022-11-17 at 2 13 59 PM
trulow commented 1 year ago

Move your ffmpeg, ffplay, and ffprobe binaries into a bin/ffmpeg directory and relaunch the application using python3 __init__.py

casualsnek commented 1 year ago

Can you try the development branch now ? The Pydub module that caused this issue is now not used. So ffprobe is not needed either ! Can you give development branch a try and see if the issue is fixed ?