mobiusml / aana_sdk

Aana SDK is a powerful framework for building AI enabled multimodal applications.
https://www.mobiuslabs.com/
Apache License 2.0
26 stars 3 forks source link

Download Video Error [BUG] #55

Open HRashidi opened 7 months ago

HRashidi commented 7 months ago

Bug Description

Steps to Reproduce

  1. Sending multiple requests with same video url

Expected Behavior

Actual Behavior

Environment

HRashidi commented 7 months ago

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!