You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found a scenario in which trying to use the endpoint for downloading a video using bestvideo+bestaudio fails.
To reproduce:
Run youtube-dl-web.
Browse directly to the following URL: http://localhost/api/dl/awjBLm41xJI?f=bestvideo%2Bbestaudio
Instead of the download process beginning, you will receive the following error text: Internal Server Error
Check the log of the youtube-dl-web-server container. The log will contain the following stack trace which was generated from the failed download attempt.
[awjBLm41xJI]: requested with format bestvideo+bestaudio and subs None, configuring...
[awjBLm41xJI]: sending stream
[awjBLm41xJI]: stream will be merged (bestvideo+bestaudio)
[awjBLm41xJI]: end of data (no error reported)
cleanup[awjBLm41xJI]: killing downloader process (PID: 62)
INFO: 172.19.0.2:55686 - "GET /dl/awjBLm41xJI?f=bestvideo%2Bbestaudio HTTP/1.0" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 377, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/fastapi/applications.py", line 212, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 181, in __call__
raise exc
File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.9/site-packages/starlette/exceptions.py", line 82, in __call__
raise exc
File "/usr/local/lib/python3.9/site-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 656, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 259, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 61, in app
response = await func(request)
File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 226, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 159, in run_endpoint_function
return await dependant.call(**values)
File "/home/user/app/./server.py", line 23, in api_dl
first_chunk = await stream.__anext__() # peek first chunk
StopAsyncIteration
I have found that this seems to happen for some audio and video combinations when using the web UI as well. For example, here is a screenshot showing the configuration I attempted to use for this video through the web UI.
The text was updated successfully, but these errors were encountered:
Update on this: I encountered it today for the first time! Looks like it's something to do with DASH video...? The error StopAsyncIteration is thrown whenever Google's server returns no data at all. Seems like FFMPEG just bails immediately, gets reaped and so nothing is sent back to the user.
Thank you! I'd intended to investigate as well, but unfortunately, the project I was using this for got delayed because my life got too busy to devote time to it. Hopefully you find the solution!
I have found a scenario in which trying to use the endpoint for downloading a video using
bestvideo+bestaudio
fails.To reproduce:
youtube-dl-web
.http://localhost/api/dl/awjBLm41xJI?f=bestvideo%2Bbestaudio
Internal Server Error
youtube-dl-web-server
container. The log will contain the following stack trace which was generated from the failed download attempt.I have found that this seems to happen for some audio and video combinations when using the web UI as well. For example, here is a screenshot showing the configuration I attempted to use for this video through the web UI.
The text was updated successfully, but these errors were encountered: