datawhores / OF-Scraper

A completely revamped and redesigned fork, reimagined from scratch based on the original onlyfans-scraper
MIT License
655 stars 54 forks source link

Error with merging video and audio - v3.10.2 #411

Closed blackfox76 closed 3 months ago

blackfox76 commented 3 months ago

I am currently running the script through docker with the latest version 3.10.2

The issue is when it is downloading videos content that needs to run through the keydb. It downloads both the audio and video content just fine as two separate files. The issue is that once it merges it into one file it then deletes the file.

I have copied the error from the logging file below

2024-06-07 13:08:43:[alt_downloadbatch.alt_download:55] Media:3279639396 Post:2953329016626 Downloading with batch protected media downloader 2024-06-07 13:08:43:[alt_downloadbatch.alt_download:58] Media:3279639396 Post:2953329016626 download url: https://cdn3.onlyfans.com/dash/files/b/b0/{hidden}/{hidden}.mpd 2024-06-07 13:08:44:[log.path_to_file_logger:16] Media:3279639396 Post:2953329016626 [attempt 0/10] filename from config 0hos7k4eajrtzr152peuz_source.mp4 2024-06-07 13:08:44:[log.path_to_file_logger:19] Media:3279639396 Post:2953329016626 [attempt 0/10] full path from config /home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/0hos7k4eajrtzr152peuz_source.mp4 2024-06-07 13:08:44:[log.path_to_file_logger:22] Media:3279639396 Post:2953329016626 [attempt 0/10] full path trunicated from config /home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/0hos7k4eajrtzr152peuz_source.mp4 2024-06-07 13:08:44:[alt_downloadbatch.alt_download_sendreq:190] Media:3279639396 Post:2953329016626 Attempting to download media 0hos7k4eajrtzr152peuz_audio.mp4 with https://cdn3.onlyfans.com/dash/files/b/b0/b0c29ed90708b5e89cd7abc3fc164b84/0hos7k4eajrtzr152peuz_audio.mp4 2024-06-07 13:08:44:[alt_downloadbatch.alt_download_sendreq:193] Media:3279639396 Post:2953329016626 download temp path /home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/tempaudio_0hos7k4eajrtzr152peuz_audio.mp4.part 2024-06-07 13:10:44:[downloadbatch.consumer:357] unpack ('skipped', 0) count 2 2024-06-07 13:08:45:[log.temp_file_logger:29] Media:3279639396 Post:2953329016626 [attempt 0/10] filename from config /home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/tempaudio_0hos7k4eajrtzr152peuz_audio.mp4.part 2024-06-07 13:08:48:[alt_downloadbatch.alt_download_sendreq:190] Media:3279639396 Post:2953329016626 Attempting to download media 0hos7k4eajrtzr152peuz_source.mp4 with https://cdn3.onlyfans.com/dash/files/b/b0/b0c29ed90708b5e89cd7abc3fc164b84/0hos7k4eajrtzr152peuz_source.mp4 2024-06-07 13:08:48:[alt_downloadbatch.alt_download_sendreq:193] Media:3279639396 Post:2953329016626 download temp path /home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/tempvid_0hos7k4eajrtzr152peuz_source.mp4.part 2024-06-07 13:08:50:[log.temp_file_logger:29] Media:3279639396 Post:2953329016626 [attempt 1/10] filename from config /home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/tempvid_0hos7k4eajrtzr152peuz_source.mp4.part 2024-06-07 13:10:51:[keyhelpers.un_encrypt:81] Media:3270594542 Post:2917053159212 mp4decrypt success /home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/tempvid_0hokk94zvm8e87rmurv2p_source.mp4 2024-06-07 13:10:51:[handle_result.handle_result_alt:88] Media:3270594542 Post:2917053159212 ffmpeg failed 2024-06-07 13:10:51:[handle_result.handle_result_alt:92] Media:3270594542 Post:2917053159212 ffmpeg 2024-06-07 13:10:51:[handle_result.handle_result_alt:89] Media:3270594542 Post:2917053159212 ffmpeg /usr/bin/ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory

2024-06-07 13:10:51:[handle_result.handle_result_alt:99] Moving intermediate path /home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/temp_3270594542.mp4 to /home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/0hokk94zvm8e87rmurv2p_source.mp4 2024-06-07 13:10:51:[helpers.inner:11] Media:3270594542 Post:2917053159212 Download Failed [Errno 2] No such file or directory: '/home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/temp_3270594542.mp4' 2024-06-07 13:10:51:[helpers.inner:11] Media:3270594542 Post:2917053159212 exception Traceback (most recent call last): File "/usr/local/lib/python3.11/shutil.py", line 853, in move os.rename(src, real_dst) FileNotFoundError: [Errno 2] No such file or directory: '/home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/temp_3270594542.mp4' -> '/home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/0hokk94zvm8e87rmurv2p_source.mp4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/venv/lib/python3.11/site-packages/ofscraper/download/downloadbatch.py", line 438, in download return await alt_download(c, ele, username, model_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/venv/lib/python3.11/site-packages/ofscraper/download/alt_downloadbatch.py", line 86, in alt_download return await handle_result_alt( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/venv/lib/python3.11/site-packages/ofscraper/download/shared/handle_result.py", line 102, in handle_result_alt common_paths.moveHelper(temp_path, sharedPlaceholderObj.trunicated_filepath, ele) File "/venv/lib/python3.11/site-packages/ofscraper/download/shared/paths/paths.py", line 21, in moveHelper shutil.move(temp, path_to_file) File "/usr/local/lib/python3.11/shutil.py", line 873, in move copy_function(src, real_dst) File "/usr/local/lib/python3.11/shutil.py", line 448, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/local/lib/python3.11/shutil.py", line 256, in copyfile with open(src, 'rb') as fsrc: ^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/home/ofscraper/Data/ofscraper/content-creator/Messages/Videos/temp_3270594542.mp4'

I have noticed that there is never a file called temp_3270594542.mp4 but there is a file called temp_0hokk94zvm8e87rmurv2p_source.mp4

datawhores commented 3 months ago

I'm not sure what is wrong with your systems ffmpeg but can you try a non-shared version from here https://github.com/BtbN/FFmpeg-Builds/releases/

like https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz

Extract it and put and provide it to the config file

blackfox76 commented 3 months ago

I let docker download ffmpeg and that seems to have resolved the issue. thanks