5
August
2024
15:21

Running YT-DLP through a local SOCKS proxy server

5 August 2024 15:21

YT-DLP is designed for downloading videos from YouTube, but high-definition 1080p videos are slow. The solution is a local SOCKS proxy server through which traffic passes.

Introduction:

This method does not involve the use of a VPN and is not an advertisement for ways to bypass blocking of sites with unwanted information, but only to improve the performance of viewing and downloading videos from YouTube hosting.

In accordance with Article 29 of the Constitution of the Russian Federation, “Everyone has the right to freely seek, transmit, produce and disseminate information in any legal way.” The website youtube.com and its IP addresses are accessible in the Russian Federation and have not been blocked. Therefore, posting this article is legal. If Roskomnadzor lawyers think differently, this article will be deleted if you contact me through the feedback form or by mail or email from authorized persons.

All actions are performed on one local computer running Linux OS, the source texts were written by the author hufrea and are on GitHub for unlimited viewing.

Procedure:
1) put together a project to solve the problem with video speed from YouTube,
2) run the ciadpi program with the parameters from its documentation.
3) launch the Mozilla Firefox browser through a local proxy, step 2.
4) register a local proxy server in YT-DLP using the key, step 2.

1. Assembly

I chose the project as a local proxy https://github.com/hufrea/byedpi.

Cloning the project and building:

git clone https://github.com/hufrea/byedpi.git

I went to the project directory, compiled and built using the make command:

cd byedpi
make

2. Launch

./ciadpi --disorder 1

documentation on program keys -[https://github.com/hufrea/byedpi](на странице проекта github.com/hufrea/byedpi).

3. Setting up the Mozilla Firefox browser

In Mozilla FireFox:
Preferences (about:preferences)
Network settings - Configure
Manual Proxy setup

  • SOCKS node 127.0.0.1
  • port 1080

Checking the video - everything works.

4. Launch YT-DLP from the command line through a local SOCKS proxy server

yt-dlp --proxy socks5://127.0.0.1:1080/ URL_OF_VIDEO_YOUTUBE

where the --proxy socks5://127.0.0.1:1080/ key specifies the local proxy server
URL_OF_VIDEO_YOUTUBE replace with a link to the YouTube video

On my PC, the download speed for 1080p video via ciadpi is about 40 Mbps.