Open jeffli678 opened 5 years ago
I do not read your code so I have no idea currently how alltube avoids the throttling, but it works!
For regular downloads, we use range requests to get a multiple chunks of the video and assemble them. Unfortunately, ffmpeg does not support this out of the box.
One viable approach is to have alltube download the video and audio and send it to FFmpeg for remuxing.
While it is theoretically possible to do this, I don't think we have an easy way to do it because the Symfony Process library does not provide a way to write to multiple input streams.
(It could also be possible to use posix_mkfifo but I want to avoid writing to the file system.)
Anyway, I will think about it :slightly_smiling_face:
is there anything that can be done on my end to speed up audio only downloads.
Audio-only downloads (not conversion) are not throttled anymore (see https://github.com/Rudloff/alltube/issues/217) so if they are slow it is likely an issue with your server ressources (bandwidth, disk speed, etc.).
New issue
Your environment
Please answer these questions when reporting a new issue:
What is your operating system (Windows, Linux, OSX, etc.)? Ubuntu 16.04 Server
What is your web server (Apache, IIS, etc.)? Nginx
What version of AllTube are you using? 2.0.1
How did you install AllTube (with Git or with a release package)? release package
What version of PHP are you using? PHP 7.0.33-0ubuntu0.16.04.3 (cli) ( NTS )
What version of Python are you using? Python 2.7.12 (default, Nov 12 2018, 14:36:49)
What version of youtube-dl are you using? 2019.04.24
Do you get any PHP-related errors in your webserver's logs? No
What is the content of your
config/config.yml
file?Please provide the URL of a video that causes the issue.
https://www.youtube.com/watch?v=gXkSF0RWauA
Describe your issue
I verify that the previous YouTube slow download issue is fixed in the 2.0.1 release. However, I found the download speed is still slow (throttled to 1MB/s) when I choose to remux the best video and audio. The server CPU and memory usage are low at the time so it is not a performance issue.
I checked the FFmpeg command line and find the FFmpeg is directly downloading the video and audio. This is probably the reason why it gets throttled -- directly downloading the video in big chunks will trigger the server to throttle the download. I think this is not a huge issue -- because we can still download the best video and audio and remux locally. However, it is still better to solve this problem.
One viable approach is to have alltube download the video and audio and send it to FFmpeg for remuxing. I do not read your code so I have no idea currently how alltube avoids the throttling, but it works!