Top Related Projects
A feature-rich command-line audio/video downloader
Command-line program to download videos from YouTube.com and other video sites
A libre lightweight streaming front-end for Android.
yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
Invidious is an alternative front-end to YouTube
Quick Overview
Alltube is an open-source web interface for youtube-dl, a popular command-line program to download videos from YouTube and other video platforms. It provides a user-friendly way to download videos and audio from various websites without needing to use the command line directly.
Pros
- Easy-to-use web interface for youtube-dl
- Supports a wide range of video hosting platforms
- Can be self-hosted for privacy and control
- Offers both video and audio-only download options
Cons
- Requires server setup and maintenance
- May face legal issues depending on usage and jurisdiction
- Performance can be affected by high concurrent usage
- Relies on youtube-dl, which may break due to website changes
Getting Started
To set up Alltube on your server:
- Ensure you have PHP 7.4 or higher and Composer installed.
- Clone the repository:
git clone https://github.com/Rudloff/alltube.git cd alltube
- Install dependencies:
composer install
- Copy the config file and edit as needed:
cp config/config.example.yml config/config.yml
- Set up a web server (e.g., Apache or Nginx) to serve the
public
directory. - Access the Alltube interface through your web browser.
For more detailed instructions, including Docker setup, refer to the project's README and documentation.
Competitor Comparisons
A feature-rich command-line audio/video downloader
Pros of yt-dlp
- More actively maintained with frequent updates
- Supports a wider range of websites and video platforms
- Offers more advanced features like sponsorblock integration and video quality selection
Cons of yt-dlp
- Command-line interface may be less user-friendly for non-technical users
- Requires local installation and setup, which can be complex for some users
Code Comparison
yt-dlp (Python):
import yt_dlp
ydl_opts = {}
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
ydl.download(['https://www.youtube.com/watch?v=dQw4w9WgXcQ'])
alltube (PHP):
require_once 'Config.class.php';
require_once 'Video.class.php';
$video = new Video('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
$video->getUrl();
yt-dlp is a powerful command-line tool for downloading videos from various platforms, offering extensive features and regular updates. alltube provides a web-based interface for video downloads, making it more accessible to casual users but with potentially fewer advanced options. yt-dlp's code example demonstrates direct video download, while alltube's code retrieves the video URL for further processing or embedding.
Command-line program to download videos from YouTube.com and other video sites
Pros of youtube-dl
- More comprehensive support for various video platforms
- Extensive command-line options for fine-tuned control
- Actively maintained with frequent updates
Cons of youtube-dl
- Requires command-line usage, which may be less user-friendly for some
- No built-in web interface for easy access
Code Comparison
youtube-dl (Python):
ydl_opts = {
'format': 'bestaudio/best',
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download(['https://www.youtube.com/watch?v=BaW_jenozKc'])
alltube (PHP):
$video = VideoDownload::getVideo($url);
$video->getUrl();
$video->getFilename();
$video->download();
Summary
youtube-dl is a powerful command-line tool with extensive platform support and customization options. alltube provides a user-friendly web interface for video downloads but may have more limited platform support. youtube-dl is more suitable for advanced users and developers, while alltube caters to those who prefer a simple web-based solution.
A libre lightweight streaming front-end for Android.
Pros of NewPipe
- Native Android app with a user-friendly interface
- Supports background playback and picture-in-picture mode
- Offers additional features like subscriptions and playlists without account
Cons of NewPipe
- Limited to Android devices only
- Requires manual updates or F-Droid installation
- May break temporarily when YouTube changes its API
Code Comparison
NewPipe (Java):
@Override
protected Single<ListExtractor.InfoItemsPage> loadResult(final String url, final String nextPageUrl, final ContentCountry contentCountry) {
return Single.fromCallable(() -> SearchExtractor.getSearchExtractor(url, Collections.emptyList(), contentCountry))
.flatMap(extractor -> ExtractorHelper.getItemsPageOrLogError(extractor, nextPageUrl));
}
AllTube (PHP):
public function getVideo(string $url, string $format = null): Video
{
$video = new Video($url);
if (isset($format)) {
$video->setFormat($format);
}
$video->getJson();
return $video;
}
NewPipe is a feature-rich Android app for streaming videos, while AllTube is a web-based YouTube downloader. NewPipe offers a native mobile experience with advanced playback features, but is limited to Android. AllTube provides a platform-independent solution accessible through web browsers, albeit with fewer features compared to NewPipe.
yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
Pros of yewtube
- Command-line interface for streamlined, keyboard-driven operation
- Lightweight and resource-efficient, suitable for low-end systems
- Supports playlist management and local file playback
Cons of yewtube
- Limited to audio playback; no video support
- Requires more technical knowledge to set up and use
- Less user-friendly for those accustomed to graphical interfaces
Code Comparison
yewtube:
def play_audio(audio_url, seek=None):
player = Player(audio_url, seek)
player.play()
alltube:
public function getAudioStream(string $url): StreamInterface
{
$video = $this->getVideo($url);
return $video->getAudioStream();
}
Key Differences
- yewtube is a Python-based CLI tool, while alltube is a PHP web application
- alltube offers video downloading and streaming, yewtube focuses on audio
- yewtube provides more advanced playlist and search features
- alltube has a graphical interface, making it more accessible to casual users
- yewtube is better suited for power users and developers
Both projects aim to provide access to online media content, but they cater to different user needs and preferences. yewtube excels in efficiency and advanced audio features, while alltube offers a more user-friendly experience with broader media support.
Invidious is an alternative front-end to YouTube
Pros of Invidious
- More comprehensive YouTube alternative, offering a full-featured front-end
- Supports user accounts and subscriptions
- Provides additional privacy features like proxy functionality
Cons of Invidious
- More complex setup and maintenance due to its broader feature set
- Higher server resource requirements for hosting
Code Comparison
Invidious (Crystal):
def self.fetch_video_info(id : String, region : String? = nil)
params = HTTP::Params.encode({
"video_id" => id,
"eurl" => "https://youtube.googleapis.com/v/#{id}",
"ps" => "default",
"gl" => region || "US",
"hl" => "en",
})
# ... (additional code)
end
AllTube (PHP):
public function getJson(string $url, array $requestOptions = []): array
{
$requestOptions[RequestOptions::HEADERS]['Accept'] = 'application/json';
$response = $this->getResponse($url, $requestOptions);
return json_decode($response->getBody()->getContents(), true);
}
Both projects aim to provide alternative ways to access YouTube content, but Invidious offers a more comprehensive solution with additional features and privacy enhancements. AllTube, on the other hand, focuses primarily on video downloading and conversion, making it simpler to set up and maintain. The code snippets showcase the different programming languages used (Crystal for Invidious, PHP for AllTube) and their approaches to handling video information and API requests.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
AllTube Download
HTML GUI for youtube-dl
Setup
From a release package
You can download the latest release package here.
You just have to unzip it on your server and it should be ready to use.
From Git
In order to get AllTube working, you need to use Composer:
composer install
This will download all the required dependencies.
You should also ensure that the templates_c folder has the right permissions:
chmod 770 templates_c/
(You need to adapt this to your permission model. You can find more information about this in the Smarty documentation.)
If your web server is Apache,
you need to set the AllowOverride
setting to All
or FileInfo
.
Update
When updating from Git, you need to run Composer again:
git pull
composer install
On Heroku
On Cloudron
Cloudron is a complete solution for running apps on your server and keeping them up-to-date and secure.
The source code for the package can be found here.
Config
If you want to use a custom config, you need to create a config file:
cp config/config.example.yml config/config.yml
PHP requirements
You will need PHP 7.2 (or higher) and the following PHP modules:
- intl
- mbstring
- gmp
Web server configuration
If you want to serve the application under a basepath and/or with a different internal than external port (scenario: nginx->docker setup) Alltube supports the following X-Forwarded headers:
- X-Forwarded-Host (ex.
another.domain.com
) - X-Forwarded-Path (ex:
/alltube
) - X-Forwarded-Port (ex:
5555
) - X-Forwarded-Proto (ex:
https
)
Apache
The following modules are recommended:
- mod_mime
- mod_rewrite
- mod_expires
- mod_filter
- mod_deflate
- mod_headers
Nginx
Here is an example Nginx configuration:
server {
server_name localhost;
listen 443 ssl;
root /var/www/path/to/alltube;
index index.php;
access_log /var/log/nginx/alltube.access.log;
error_log /var/log/nginx/alltube.error.log;
types {
text/html html htm shtml;
text/css css;
text/xml xml;
application/x-web-app-manifest+json webapp;
}
# Deny access to dotfiles
location ~ /\. {
deny all;
}
location / {
try_files $uri /index.php?$args;
}
location ~ \.php$ {
try_files $uri /index.php?$args;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
include fastcgi_params;
}
}
Other dependencies
You need ffmpeg in order to enable conversions. (Conversions are disabled by default.)
On Debian-based systems:
sudo apt-get install ffmpeg
If your ffmpeg binary is not installed at /usr/bin/ffmpeg
, you also need to edit the ffmpeg
variable in config.yml
.
Use as a library
The Video
class is now available as a separate package
so that you can reuse it in your projects.
JSON API
We also provide a JSON API that you can use like this:
/json?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ
It returns a JSON object generated by youtube-dl. You can find a list of all the properties in the youtube-dl documentation.
FAQ
Please read the FAQ before reporting any issue.
License
This software is available under the GNU General Public License.
Top Related Projects
A feature-rich command-line audio/video downloader
Command-line program to download videos from YouTube.com and other video sites
A libre lightweight streaming front-end for Android.
yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
Invidious is an alternative front-end to YouTube
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot