Let's say you don't convert videos, you just copy them from graber. How to limit the download speed from the tube source? ( let's say xhamster ).
Where should i add it exactly in this file?
Also it will just limit the download speed from the tube source to the media server, not the users download speed of the videos on my site, right?
Last edited by happylag (2017-04-18 17:16:53)
Yes, it will limit the download speed for the files that are being downloaded on your server (by the graber). Edit libraries/framework/curl.php and add:
curl_setopt($ch, CURLOPT_MAX_RECV_SPEED_LARGE, 10240);
$ch = curl_init(); $fh = fopen($file, 'w'); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FILE, $fh); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, CURL_TIMEOUT); curl_setopt($ch, CURLOPT_VERBOSE, CURL_VERBOSE); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($ch, CURLOPT_NOPROGRESS, CURL_PROGRESS); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:126.96.36.199) Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/188.8.131.52');
Please note that you need a recent version of curl and php. Also i never tested this on freebsd.