Jules-WinnfieldX / CyberDropDownloader

Bulk Gallery Downloader for Cyberdrop.me and Other Sites
GNU General Public License v3.0
1.61k stars 182 forks source link

[BUG] Linux: RuntimeError: FFmpeg is not installed #700

Closed yoleska-dev closed 9 months ago

yoleska-dev commented 9 months ago

Describe the bug I didn't do anything special here. Just ran the program and when it came time to sort the downloads, I got this error:

Sorting Downloads: Please Wait Unhandled exception; stopping loop: 'Task exception was never retrieved' Traceback (most recent call last): File "/home/adebisi/.local/lib/python3.10/site-packages/aiorun.py", line 219, in new_coro await coro File "/home/adebisi/.local/lib/python3.10/site-packages/cyberdrop_dl/main.py", line 86, in director await sorter.sort() File "/home/adebisi/.local/lib/python3.10/site-packages/cyberdrop_dl/utils/sorting.py", line 75, in sort await self.sort_video(file, folder.name) File "/home/adebisi/.local/lib/python3.10/site-packages/cyberdrop_dl/utils/sorting.py", line 129, in sort_video props = get_video_properties(str(file)) File "/home/adebisi/.local/lib/python3.10/site-packages/videoprops/__init__.py", line 62, in get_video_properties return get_stream_properties(movie, *P_VIDEO) File "/home/adebisi/.local/lib/python3.10/site-packages/videoprops/__init__.py", line 52, in get_stream_properties output = check_output([which_ffprobe(), *ffprobe_args, movie], encoding='utf-8') File "/home/adebisi/.local/lib/python3.10/site-packages/videoprops/__init__.py", line 36, in which_ffprobe raise RuntimeError('FFmpeg is not installed') RuntimeError: FFmpeg is not installed

To Help Reproduce This is not running in the pyenv that the new installer sets up. It's an upgrade from ver 4.x.

Screenshots See error above

Setup Information Linux Ubuntu 22.04.3

Downloader.log file adebisi@tarzan:/mnt/X/Cyber-DL/AppData/Configs/AppData/Configs/Default/Logs$ cat downloader.log 2023-12-06 09:23:37,145:utilities.py:81:Starting Cyberdrop-DL Process for Default Config 2023-12-06 09:23:37,145:utilities.py:81:Running version 5.0.54 2023-12-06 09:23:37,145:utilities.py:81:Using Authentication: { "DDOS-Guard": { "Bunkrr Provided": false, "Coomer Provided": false, "Kemono Provided": false }, "Forums Credentials": { "celebforum Credentials Provided": false, "f95zone Credentials Provided": false, "leakedmodels Credentials Provided": false, "nudostar Credentials Provided": false, "simpcity Credentials Provided": false, "socialmediagirls Credentials Provided": false, "xbunker Credentials Provided": false }, "Forums XF Cookies": { "celebforum XF Cookie Provided": false, "f95zone XF Cookie Provided": false, "leakedmodels XF Cookie Provided": false, "nudostar XF Cookie Provided": false, "simpcity XF Cookie Provided": false, "socialmediagirls XF Cookie Provided": false, "xbunker XF Cookie Provided": false }, "GoFile Provided": false, "Imgur Provided": false, "JDownloader Provided": false, "PixelDrain Provided": false, "Reddit Provided": false } 2023-12-06 09:23:37,145:utilities.py:81:Using Settings: { "Download_Options": { "block_download_sub_folders": false, "disable_download_attempt_limit": false, "disable_file_timestamps": false, "include_album_id_in_folder_name": false, "include_thread_id_in_folder_name": false, "remove_domains_from_folder_names": false, "remove_generated_id_from_filenames": false, "scrape_single_forum_post": false, "separate_posts": false, "skip_download_mark_completed": false }, "File_Size_Limits": { "maximum_image_size": 0, "maximum_other_size": 0, "maximum_video_size": 0, "minimum_image_size": 0, "minimum_other_size": 0, "minimum_video_size": 0 }, "Files": { "download_folder": "Downloads/Cyberdrop-DL Downloads", "input_file": "AppData/Configs/Default/URLs.txt" }, "Ignore_Options": { "exclude_audio": false, "exclude_images": false, "exclude_other": false, "exclude_videos": false, "ignore_coomer_ads": false, "only_hosts": [], "skip_hosts": [] }, "Logs": { "download_error_urls_filename": "Download_Error_URLs.csv", "last_forum_post_filename": "Last_Scraped_Forum_Posts.txt", "log_folder": "AppData/Configs/Default/Logs", "main_log_filename": "downloader.log", "scrape_error_urls_filename": "Scrape_Error_URLs.csv", "unsupported_urls_filename": "Unsupported_URLs.txt" }, "Runtime_Options": { "delete_partial_files": false, "ignore_history": false, "send_unsupported_to_jdownloader": false, "skip_check_for_empty_folders": false, "skip_check_for_partial_files": false }, "Sorting": { "sort_downloads": false, "sort_folder": "Downloads/Cyberdrop-DL Sorted Downloads", "sort_incremementer_format": " ({i})", "sorted_audio": "{sort_dir}/{base_dir}/Audio/{filename}{ext}", "sorted_image": "{sort_dir}/{base_dir}/Images/{filename}{ext}", "sorted_other": "{sort_dir}/{base_dir}/Other/{filename}{ext}", "sorted_video": "{sort_dir}/{base_dir}/Videos/{filename}{ext}" } } 2023-12-06 09:23:37,145:utilities.py:81:Using Global Settings: { "General": { "allow_insecure_connections": false, "max_file_name_length": 95, "max_folder_name_length": 60, "proxy": "", "required_free_space": 5, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0" }, "Rate_Limiting_Options": { "connection_timeout": 15, "download_attempts": 10, "download_delay": 0, "max_simultaneous_downloads": 15, "max_simultaneous_downloads_per_domain": 5, "rate_limit": 50, "read_timeout": 300 } } 2023-12-06 09:23:37,200:utilities.py:81:No valid links found. 2023-12-06 09:23:37,204:utilities.py:86:Checking for partial downloads... 2023-12-06 09:23:37,212:utilities.py:86:Checking for empty folders... 2023-12-06 09:23:37,217:utilities.py:86: Download Stats: 2023-12-06 09:23:37,217:utilities.py:86:Downloaded 0 files 2023-12-06 09:23:37,218:utilities.py:86:Previously Downloaded 0 files 2023-12-06 09:23:37,218:utilities.py:86:Skipped By Config 0 files 2023-12-06 09:23:37,218:utilities.py:86:Failed 0 files 2023-12-06 09:23:37,218:utilities.py:86: Scrape Failures: 2023-12-06 09:23:37,219:utilities.py:86: Download Failures: 2023-12-06 09:23:37,268:utilities.py:86: Finished downloading. Enjoy :) adebisi@tarzan:/mnt/X/Cyber-DL/AppData/Configs/AppData/Configs/Default/Logs$

Additional context Something that is probably not related, but just in case. There's a duplicate folder/path.
The log path from above is in 👍 /Cyber-DL/AppData/Configs/AppData/Configs/Default/Logs I think it should just be /Cyber-DL/AppData/Configs/Logs

Jules-WinnfieldX commented 9 months ago

So for your additional context,

It would seem to me that likely happened as you had a command prompt open in /appdata/configs and ran cyberdrop-dl from that dir.

It creates an appdata folder wherever you run it.

I'll need to think on the rest.

Jules-WinnfieldX commented 9 months ago

Unless @qarkai has a suggestion here. For me it seems like it'll probably end up being a check for OS type before calling any of the additional info while sorting.

qarkai commented 9 months ago

get_video_properties package provides ffprobe binaries for macOS and Windows. On Linux it depends on external ffprobe. See https://github.com/mvasilkov/python-get-video-properties/blob/master/videoprops/__init__.py#L25

RuntimeError exception was fixed in v5.0.64 for video and in v5.0.67 for audio files. So @yoleska-dev you need to update application. But without ffprobe all fields would be Unknown. @yoleska-dev you should install ffmpeg or whatever provides ffprobe in Ubuntu.

FFmpeg requirement should be mentioned in documentation for installation on Linux. Somewhere in https://jules-winnfieldx.gitbook.io/cyberdrop-dl/quick-start I guess.

Upd. Usually ffmpeg is already installed since popular Linux players (mpv, vlc) depend on it. Though I can imagine setup where cyberdrop-dl works on one device (some kind of server) and players work on another device (desktop, phone, TV).