Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Video Error [BUG] #55

Open
HRashidi opened this issue Feb 22, 2024 · 1 comment
Open

Download Video Error [BUG] #55

HRashidi opened this issue Feb 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@HRashidi
Copy link
Contributor

Bug Description

  • The SDK throws error when trying to download same video in different process simultaneously using decord

Steps to Reproduce

  1. Sending multiple requests with same video url

Expected Behavior

  • The sdk should download the video in the first request and the send request wait for it to be downloaded. Or using a unique name for downloaded video.

Actual Behavior

  • The sdk will check if the video is already downloaded or not, but if the requests send in parallel, it stores temp video in (vidoe.pm4.part1) which causes the existence check to be failed.

Environment

  • The main branch.
@HRashidi HRashidi added the bug Something isn't working label Feb 22, 2024
@HRashidi
Copy link
Contributor Author

Erroe messages:
"\u001b[36mray::download_video()\u001b[39m (pid=120109, ip=172.17.0.5)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 3675, in post_process\n info = self.run_all_pps('post_process', info, additional_pps=info.get('__postprocessors'))\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 3657, in run_all_pps\n info = self.run_pp(pp, info)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 3635, in run_pp\n files_to_delete, infodict = pp.run(infodict)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/postprocessor/common.py\", line 23, in run\n ret = func(self, info, *args, **kwargs)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/postprocessor/common.py\", line 128, in wrapper\n return func(self, info)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/postprocessor/ffmpeg.py\", line 837, in run\n self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/postprocessor/ffmpeg.py\", line 329, in run_ffmpeg_multiple_files\n return self.real_run_ffmpeg(\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/postprocessor/ffmpeg.py\", line 367, in real_run_ffmpeg\n raise FFmpegPostProcessorError(stderr.strip().splitlines()[-1])\nyt_dlp.postprocessor.ffmpeg.FFmpegPostProcessorError: Conversion failed!\n\nDuring handling of the above exception, another exception occurred:\n\n\u001b[36mray::download_video()\u001b[39m (pid=120109, ip=172.17.0.5)\n File \"/root/aana_sdk/aana/utils/video.py\", line 196, in download_video\n ydl.download([video_input.url])\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 3541, in download\n self.__download_wrapper(self.extract_info)(\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 3516, in wrapper\n res = func(*args, **kwargs)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 1576, in extract_info\n return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 1587, in wrapper\n return func(self, *args, **kwargs)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 1743, in __extract_info\n return self.process_ie_result(ie_result, download, extra_info)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 1802, in process_ie_result\n ie_result = self.process_video_result(ie_result, download=download)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 2952, in process_video_result\n self.process_info(new_info)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 3497, in process_info\n self.report_error('Postprocessing: %s' % str(err))\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 1054, in report_error\n self.trouble(f'{self._format_err(\"ERROR:\", self.Styles.ERROR)} {message}', *args, **kwargs)\n File \"/root/.cache/pypoetry/virtualenvs/aana-XDlPP_xZ-py3.10/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py\", line 993, in trouble\n raise DownloadError(message, exc_info)\nyt_dlp.utils.DownloadError: ERROR: Postprocessing: Conversion failed!\n\nThe above exception was the direct cause of the following exception:\n\n\u001b[36mray::download_video()\u001b[39m (pid=120109, ip=172.17.0.5)\n File \"/root/aana_sdk/aana/utils/video.py\", line 209, in download_video\n raise DownloadException(url=video_input.url, msg=error_message) from e\naana.exceptions.general.DownloadException: DownloadException(url=https://www.youtube.com/watch?v=xNRJwmlRBNU)"

(download_video pid=120109) [download] /tmp/aana_data/videos/0dbb70a1657193166607765927d8335a.f313.webm has already been downloaded
[download] 100% of 59.10MiB
(download_video pid=120109) [download] /tmp/aana_data/videos/0dbb70a1657193166607765927d8335a.f251.webm has already been downloaded
[download] 100% of 6.93MiB
(download_video pid=120109) [Merger] Merging formats into "/tmp/aana_data/videos/0dbb70a1657193166607765927d8335a.webm"
(ServeReplica:default:RequestHandler pid=120531) INFO 2024-02-22 13:20:23,371 RequestHandler default#RequestHandler#omUvix b4a0e716-433a-4264-b12d-af506033f826 /video/index_s
tream default replica.py:726 - CALL OK 3960.1ms
(download_video pid=120109) ERROR: Postprocessing: Conversion failed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant