Giter Site home page Giter Site logo

rudloff / alltube Goto Github PK

View Code? Open in Web Editor NEW
2.9K 58.0 571.0 4 MB

Web GUI for youtube-dl

License: GNU General Public License v3.0

CSS 7.59% PHP 84.40% Smarty 7.55% Dockerfile 0.36% Shell 0.08% Procfile 0.02%
php youtube-dl youtube video download vimeo dailymotion

alltube's Introduction

AllTube Download

HTML GUI for youtube-dl

Screenshot

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

Deploy

On Cloudron

Cloudron is a complete solution for running apps on your server and keeping them up-to-date and secure.

Install

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.

alltube's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alltube's Issues

Hosting

AllTube uses too much resources on my current hosting (it starts a lot of php and python instances) so I need to find a way to reduce the load or a better hosting.

Cannot download some video - Signature error

for example this : https://www.youtube.com/watch?v=ikhNSlFTpfw

http://musicstorage.club/downloader/video?url=https://www.youtube.com/watch?v=ikhNSlFTpfw
http://www.alltubedownload.net/video?url=https://www.youtube.com/watch?v=ikhNSlFTpfw

Except the directory path, the error is exactly same :
ERROR: Signature extraction failed: Traceback (most recent call last): File "/home/rinaldo/public_html/downloader/vendor/rg3/youtube-dl/youtube_dl/extractor/youtube.py", line 817, in _decrypt_signature video_id, player_url, s File "/home/rinaldo/public_html/downloader/vendor/rg3/youtube-dl/youtube_dl/extractor/youtube.py", line 744, in _extract_signature_function cache_res = res(test_string) File "/home/rinaldo/public_html/downloader/vendor/rg3/youtube-dl/youtube_dl/extractor/youtube.py", line 796, in return lambda s: initial_function([s]) File "/home/rinaldo/public_html/downloader/vendor/rg3/youtube-dl/youtube_dl/jsinterp.py", line 254, in resf res, abort = self.interpret_statement(stmt, local_vars) File "/home/rinaldo/public_html/downloader/vendor/rg3/youtube-dl/youtube_dl/jsinterp.py", line 55, in interpret_statement v = self.interpret_expression(expr, local_vars, allow_recursion) File "/home/rinaldo/public_html/downloader/vendor/rg3/youtube-dl/youtube_dl/jsinterp.py", line 135, in interpret_expression self._objects[variable] = self.extract_object(variable) File "/home/rinaldo/public_html/downloader/vendor/rg3/youtube-dl/youtube_dl/jsinterp.py", line 220, in extract_object fields = obj_m.group('fields') AttributeError: 'NoneType' object has no attribute 'group' (caused by AttributeError("'NoneType' object has no attribute 'group'",)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Not sure where to report though, youtube-dl in terminal works.

Audio-only download creates a 0-byte file

Perhaps this is just a documentation issue, but entering a YouTube (or any other source for that matter) URL and selecting the Audio only (MP3) option results in a 0-byte MP3 file being created.

Everything else works (even download in m4a). I have installed avconv and rtmpdump. Is this a bug or is there some other missing dependency? In this case, the readme should probably be updated.

An error occured - Traceback (most recent call last)

Hi, I installed this script but unfortunetly when I add the youtube link I receive this error and I didn't find how to solve it. Could you please help me with that?

An error occured

Please check the URL of your video.
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "./youtube-dl/main.py", line 16, in
File "./youtube-dl/youtube_dl/init.py", line 16, in
File "./youtube-dl/youtube_dl/options.py", line 8, in
File "./youtube-dl/youtube_dl/downloader/init.py", line 3, in
File "./youtube-dl/youtube_dl/downloader/common.py", line 9, in
File "./youtube-dl/youtube_dl/utils.py", line 25, in
File "/usr/lib/python2.7/ssl.py", line 61, in
import _ssl # if we can't import it, let the error propagate
ImportError: /usr/lib/python2.7/lib-dynload/_ssl.i386-linux-gnu.so: symbol GENERAL_NAME_free, version OPENSSL_1.0.0 not defined in file libcrypto.so.1.0.0 with link time reference

Thanks a lot!

Blank page

After configuring the config files to work on Windows, I ran npm install & composer install, however, As for npm install, I get this error

alt text

Here's the log file if you need it.

Edit:
I restarted my computer and it loads up, now I have a problem with getting the download to work.

Conversion to MP3 not working - avconv not installed?

Hi Rudloff!

I have a home server running Ubuntu 15.10, apache2 installed, downloaded the alltube release and put it into the /var/www/html folder. Normal video/audio download is possible.

I also used the command you provided to enable avconv & ffmpeg:

sudo apt-get install libavcodec-extra rtmpdump

& enabled config to set conversion = true, but conversion is not working and gives me empty mp3 files. I also see in the provided config.php file that avconv path is vendor/bin/ffmpeg, but it is not present there.

Something else I need to do to enable conversion?

Generic param

Hi,
I've the necessity to to add the param "-4" (to force the ipv4). I added it into the params configuration but, if an user downloads the mp3, there is a command (... main.py --get-filename http...) that isn't affected by "params", then a command that hasn't the added flag (-4), can you set a configuration that is generic for every command of youtube-dl?
The same problem when into the FrontController there is the command "curl --user-agent", without the needed param.
Regards.

Show an URL input field on download pages

Currently there is no download url field/button on download pages (https://all.tube.example/api.php?url=...). Adding one at the bottom (top?) of the page would save using the back button each time you want to enter another URL in an existing alltube browser tab.

"Download media" Bookmarklet

Would you add a bookmarklet to the main page (footer)? Just having to click a toolbar bookmark to instantly download media for a page would be great.

Mp3

Hi,

When I select MP3 only it takes me to streaming and won't give me a link to download as it does with video. How can I fix this?

show only link to best version

Is there any options to get as result only link to best verion of videos instead of list of all avaliable format?Thanks in advance for help.
Marcin

"No input file specified." error on download

When I click on the download button I have the following error:

No input file specified.

Nginx error log:

2016/05/05 16:32:39 [error] 16099#0: *18 FastCGI sent in stderr: "Unable to open primary script: /var/www/html/index.php (No such file or directory)" while reading response header from upstream, client: 213.213.229.32, server: SERVER.net, request: "GET /alltube/bower_components/opensans-googlefont/OpenSans-Regular.ttf HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "SERVER.net", referrer: "https://SERVER.net/alltube/dist/main.css"

2016/05/05 16:32:39 [error] 16099#0: *13 FastCGI sent in stderr: "Unable to open primary script: /var/www/html/index.php (No such file or directory)" while reading response header from upstream, client: 213.213.229.32, server: SERVER.net, request: "GET /alltube/bower_components/opensans-googlefont/OpenSans-Light.ttf HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "SERVER.net", referrer: "https://SERVER.net/alltube/dist/main.css"

2016/05/05 16:32:42 [error] 16099#0: *18 FastCGI sent in stderr: "Unable to open primary script: /var/www/html/index.php (No such file or directory)" while reading response header from upstream, client: 213.213.229.32, server: SERVER.net, request: "GET /alltube/video?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DNV59LloZ0WY HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "SERVER.net", referrer: "https://SERVER.net/alltube/"

This is my Nginx server conf:

server {
listen 80;
server_name SERVER.net www.SERVER.net;
return 301 https://$host$request_uri;
}

server {
listen 443 ssl;
server_name SERVER.net www.SERVER.net;

ssl_certificate /etc/letsencrypt/live/SERVER.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/SERVER.net/privkey.pem;

root /var/www/html;
index index.php index.html index.htm;

rewrite ^(..php)(/)(.)$ $1?file=/$3 last;

location / {
# try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php?q=$uri&$args;
}

location ^~ /.well-known/ {
allow all;
}

location ~ [^/].php(/|$) {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php5-fpm.sock;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}

Could you please give me a hand to fix this issue?

npm WARN cannot run in wd [email protected]

Hello,

I got the error:
npm WARN cannot run in wd [email protected] ./node_modules/grunt-cli/bin/grunt;

When i used the command line:
npm install

I also got the error:

PHP message: PHP Fatal error: require_once(): Failed opening required 'vendor/autoload.php' (include_path='.:/opt/php55/lib/php')

How can i fix it?

Thanks!

Blank page

Whenever I try to install AllTube all I get is a blank page? I get it with Nginx and Apache, both with PHP installed and all the dependencies required. It doesn't work on Debian 7 or 8 for me.

/usr/bin/python: can't open file 'youtube-dl': [Errno 2] No such file or directory

When I try to download a video using my local copy of alltube, I get the "An error occured" page with the following message: /usr/bin/python: can't open file 'youtube-dl': [Errno 2] No such file or directory

youtube-dl is properly installed and working from the shell on that machine (Debian Stable, apache 2.2, php 5.4.4)

How would I fix this?

Extract Audio as MP3 using FFMPEG?

Hi,

Could you please suggest how to integrate this command line into your script:

youtube-dl --extract-audio --audio-format mp3 videoURL

So that we can download the video as MP3 file (by converting it using FFMPEG).

Thanks.

wrong ip

Hi, great work on this.

Extraction method of direct video url from most sites is correct but lately many sites are starting to restrict the download to the IP that made the request.

For ex: http://allmyvideos.net/h71v2klcew7t
The extracted url looks like this:
http://d4758.allmyvideos.net/d/yomjxpemyq5dh6ln3temxnmngdz64a2luhrddpxgkdwowo4l36f5elo6e3gw62a/video.mp4?v2
This works only on the IP of the server, but not the client who is trying to download the video.

Is there a way to adapt the script to retrieve the file and serve it to the user from the server automatically?

Please tag releases

Hi, could you please provide tags for releases of your (nice) software?

git tags help keeping track of new releases, features and security fixes for users and contributors. Users/admins can check the "Releases" tab of your github project to see if their install is up to date. They can also subscribe to the RSS feed at https://github.com/Rudloff/alltube/tags.atom

A guide on basic tagging is available at http://git-scm.com/book/en/Git-Basics-Tagging but it boils down to this:

git tag v0.1 #your release number here
git push --tags

New tags could be issued when your software has received several new tested features and is ready for release, or when a critical security fix has been issued. An example of great tagging: https://github.com/chyrp/chyrp/tags

This repo currently has no tags, so may you tag the lastest revision as you like? 0.1 or 1.0 would be fine. Thanks!

error downloading youtube mp3

Hi,

i have noticed recently that downloading mp3 from youtube.com is not working....
getting this error
Fatal error: Cannot use object of type stdClass as array in /var/www/api.php on line 80

all other sites mp3 download works fine

Get the real name of video

Is there any way to get the real name of the video when people download it?

Best (mp4)
nondash-171 - audio only (DASH audio) (webm)
nondash-140 - audio only (DASH audio) (m4a)
nondash-278 - 144p (DASH video) (webm)
nondash-160 - 144p (DASH video) (mp4)
nondash-242 - 240p (DASH video) (webm)
nondash-133 - 240p (DASH video) (mp4)
nondash-243 - 360p (DASH video) (webm)

When i downloaded mp4 for example, i got the file named videoplayback.mp4 instead of the video name.mp4.

Add Example Nginx Config

Here is the config that works for me, custom ssl portions removed.
Ssl configuration needs to be added, otherwise switch

listen 443 ssl;

to

listen 80;
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;
        }
}

Add screenshot to readme

Since there is not hosted version anymore a screenshot in the readme would be helpful to see the UI before installing.

dailymotion not working

Hi,

i noticed that downloading videos from dailymotion.com no longer working

Please check the URL of your video.
ERROR: Unable to extract video info; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Object not found error (404)

Hi Rudloff!

I'm trying to install alltube on an arch linux server. Using standard apache & php installs, cloned git repository, installed using npm & composer install (needed to also manually install composer since xz support was only introced recently).

Index page showing up normally, but from the moment I insert any video url (youtube, cnn, etc...) and click the download button, I get an object not found error (see screenshot attached).

Any other setting I need to change in my apache/php install?
error

Run on Openwrt?

hi! Openwrt still doesnt have nodejs packaged and i didnt see composer packaged. Do you perhaps know of a way I can install this on Openwrt? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.