das-l / contao-youtube-dl-bundle
Contao extension: Download YouTube videos directly to the file system, using youtube-dl.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: ^7.4 || ^8.0
- contao/core-bundle: ^4.9
- das-l/youtube-dl-bundle: ^1.0
- symfony/config: ^4.4 || ^5.1
- symfony/dependency-injection: ^4.4 || ^5.1
- symfony/http-kernel: ^4.4 || ^5.1
- symfony/security-core: ^4.4 || ^5.1
- symfony/translation: ^4.4 || ^5.1
Requires (Dev)
- contao/easy-coding-standard: ^4.0
- contao/manager-plugin: ^2.0
Conflicts
- contao/manager-plugin: <2.0 || >=3.0
README
Download YouTube videos directly to the file system, using youtube-dl.
Requirements
A youtube-dl
or yt-dlp
executable needs to be available. If the binary is located somewhere unusual, you can configure the location via the respective config parameter used by the youtube-dl-bundle
:
das_l_youtube_dl:
binPath: '/your/bin/directory/youtube-dl'
ffmpeg
is also recommended so that youtube-dl
can merge downloaded audio and video into one file, because YouTube usually provides audio and video separately for most high-quality formats. If an ffmpeg
or avconv
command is not available in your environment and an executable can also not be found in any common location, you can provide the location of the binary with the following config:
das_l_contao_youtube_dl:
ffmpegPath: '/your/bin/directory/ffmpeg'
Configuration
You can customize the available maximum video height options:
das_l_contao_youtube_dl:
videoMaxHeights:
- '1080'
- '720'
- '480'
Usage
The extension adds a new icon button (a red play button with a downward-pointing green arrow) to every folder in the file system.
- Click the button at the folder to which you want to download the video.
- Provide the video ID.
- Optionally choose a maximum video height to download.
- Click "Import" and wait for the video to download.
That's all!
Permissions
The extension adds a file operation permission "Import YouTube videos" in the "Filemounts" area of the user and user group settings.
Please note
The downloader is limited to whatever the video creator uploaded and by what YouTube provides. The options you selected may possibly be discarded if no matching file could be found.
Also, this extension aims to have youtube-dl create an mp4 rather than an mkv container because mp4 has broader support. If this is causing you any problems, feel free to create an issue on GitHub so that we can find a solution that works well for everyone.