-
Notifications
You must be signed in to change notification settings - Fork 1k
Install yt‐dlp
AVideo may use yt-dlp when importing media from a supported URL. It is not required for ordinary file uploads. Only download media that you are authorized to copy and follow the source site's terms and applicable law.
youtube-dl is the older tool. Do not install both under confusing aliases; confirm which executable AVideo is configured to call.
The official yt-dlp installation guide offers release binaries and package-manager methods. For a system-wide official release binary on a typical Linux server:
set -e
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
sudo chmod 0755 /usr/local/bin/yt-dlp
/usr/local/bin/yt-dlp --version
ffmpeg -version
sudo -u www-data /usr/local/bin/yt-dlp --versionThis downloads code that will run on the server. In a controlled production environment, verify the release and its published checksums/attestations before installation.
The final three lines confirm yt-dlp, FFmpeg, and access by the normal Apache/PHP account. FFmpeg is needed for merging or converting many formats.
A successful test as your SSH user does not prove PHP can execute the command. The installation block therefore also tests as www-data. Replace that name in the block when PHP uses another service account. If AVideo uses a different configured path, test that exact path. Do not grant shell access or broad filesystem permissions merely to make the test pass.
For the official release binary, the project supports:
sudo /usr/local/bin/yt-dlp -U
If installed through an operating-system package or isolated Python tool, update it with the same method used to install it. Avoid sudo pip install into the system Python: it can conflict with OS-managed packages.
Do not schedule an unattended daily update on a production server without monitoring and rollback. Extractors change frequently, but a new release can also change dependencies or behavior. Update deliberately, verify the version and test one authorized URL.
Command not found: verify AVideo's configured executable path and the PHP service account's PATH.
Works in SSH but not AVideo: run the version test as the web-service account and inspect AVideo/Encoder logs for disabled process functions or permission errors.
Signature/extractor error: update yt-dlp from its official source and test again. See URL import extraction errors.
Login, cookie or age restriction: do not paste personal cookies into tickets or make them world-readable. Use only a supported, authorized integration and protect credentials.
Provider blocks the server: a URL working in your browser does not guarantee server-side downloads are permitted. Do not use proxy or bypass instructions to evade a provider's controls.