Video download project.
Created by Daniil Gentili.
This project is licensed under the terms of the GPLv3 license.
The programs included in this project can be used to download videos from any generic site including the Italian Rai Television website (including rai replay and iframe videos), the italian Mediaset website (including iframes like the ones on the Witty TV website), the LA7 website, and the Dplay website. And thanks to youtube-dl now they support lots of other websites!
This project features:
A Bash script that can be installed on
iOS and even on
An Android app!
And even a web version!
That can be incorporated in other websites!
This project also features a web version.
The source code of the page can be viewed here.
I used the following programs in the web version:
And used the following theme as a base:
You can incorporate this script in your website!
Just include jquery and the video-dl script with:
<script src=""></script><script src="//daniil.it/video-dl/video-dl.min.js"></script>
Or install it using npm.
npm install video-dl
Here's a list of the functions and the usage instructions.
video_dl(output, inputurl, dlsupport, messageoutput)
0 enables, anything disables.
video_dl("#result", $("input#urljs").val(), "0", "#message");
Let's say the
input#urljs text field has value
The function will get the value of the
input#urljs element, get the download links from the API, and return the following output to the
<h1 style="font-style: italic;">Video download script.</h1><br><h2 style="font-style: italic;">Created by <a href="">Daniil Gentili</a></h2><br><h1>Title:</h1> <h2>26 - Il potere degli animali fatati - Winx Club VII del 03/10/2015</h2><br><h1>Available versions:</h1><br><h2><a href="" download="26_Il_potere_degli_animali_fatati_Winx_Club_VII_del_03102015.mp4">Normal quality (mp4, 267 MiB, 720x404)</a><br></h2>
The function will then start the mailtext function with the following parameters:
See mailtext description for the result.
firstload(supportedurls, separatorstart, separatorend, messageoutput, videodaniilit)
<br>. Optional, recommended.
firstload("#supportedurls", "<li>", "</li>", "#message");
Let's say the url list is:
a b c d.
Output printed to #supportedurls is:
<li>a</li><li>b</li><li>c</li><li>d</li><a href="" target="_blank">☺</a></li>
This will also create the default contact module text with
Prints a nice message to the contact module text field, with the url if it's provided else just With
The video:does not download, could you please fix itThanks!
video.sh [ -qabp=player ] URL URL2 URL3 ...video.sh [ -qabfp=player ] URLS.txt URLS2.txt URLS3.txt ...Do not forget to put the URL between quotes if it contains special chars like & or #.Run with ./video.sh if you installed in a directory not in $PATH.Options:-q Quiet mode: useful for crontab jobs, automatically enables -a.-a Automatic mode: automatically download the video in the maximum quality.-b Use built-in API engine: requires additional programs and may not work properly on some systems but may be faster than the API server.-f Read URL(s) from specified text file(s). If specified, you cannot provide URLs as arguments.-p=player Play the video instead of downloading it using specified player, mplayer if none specified.--help Show this extremely helpful message.
On debian-derived distros, execute this command to add my repo to your system:
sudo wget -q -O /etc/apt/sources.list.d/daniil.list && wget -q -O - | sudo apt-key add - && sudo apt-key adv --recv-keys --keyserver keys.gnupg.net 72B97FD1D9672C93 && sudo apt-get update
You should see an OK if the operation was successful.
And this command to install the script.
sudo apt-get update; sudo apt-get -y install video-dl
Execute this command to install the script:
wget -O video.sh || curl -L -o video.sh; chmod +x video.sh
Run with ./video.sh in the directory where you downloaded it.
To use from any directory install the script directly in the $PATH using this command (run as root):
wget -O /usr/bin/video.sh || curl -L -o video.sh; chmod +x /usr/bin/video.sh
Now you can run it with video.sh in any directory.
Enable unknown sources and install this app. Once opened you will be presented with a user friendly interface similar to the web version.
1: initial version
1.2: added not working, share and credits button
1.2.1: added external sharing option, fixed bugs
1.2.2: Fixed not working button on external share URL, added google analytics, fixed Rai Replay on external share.
1.3: Added auto update.
1.4: Added more credits.
You tell me!
Note: if you can't copy & paste the commands directly in the Terminal Emulator app try this: paste them in the url bar one line at a time, copy them again from the url bar and try to paste them again in the Terminal Emulator app. Run these commands:
cd /sdcard && wget
To install the script directly in the $PATH use these commands (here, root is mandatory).
sumount -o rw,remount /system && wget -O /system/bin/video.sh && chmod 755 /system/bin/video.sh
If you cannot execute the script match the its shebang (the #!) to the location of the bash executable.
Jailbreak your device, add the following repo to Cydia,
... and install mobileterminal and video-dl.
Run with video.sh in mobileterminal.
To view and import the downloaded video to the gallery use iFile or Filza.
Install Cygwin (don't forget to install wget and sed during the installation process!), open its command prompt and type:
wget -O video.sh
./video.sh in the directory where you downloaded it.
To run the script from any directory run the following commands:
cd /bin && wget -O video.sh && cd $OLDPWD
This project also features an API.
The source code of the API can be viewed here.
The API uses youtube-dl to get the links for non Rai/mediaset/la7/dplay/wittytv videos.
The API supports GET requests and the endpoint is http://api.daniil.it (supports https).
The value should be the percent-encoded URL of the video to download. The response will be a list of URLS with the corresponding quality name, format, size and dimension.
Winx_Club_VI_Ep3_Il_collegio_volante Winx Club VI - Ep.3: Il collegio volanteHighest quality (mp4, 286MB, 1024x576)Medium-low quality (mp4, 131MB, 700x394)
Winx_Club_VI_Ep3_Il_collegio_volante Winx Club VI - Ep.3: Il collegio volante
Sanitized name of video for file name Original name of the video for printing to user output
Highest quality (mp4, 286MB, 1024x576)
Quality name (format, size, dimension) URL of the video
Medium-low quality (mp4, 131MB, 700x394)
Quality name (format, size, dimension) URL of the video
The qualities are ordered in decreasing order by dimension.
Supports the following values:
returns a shortened list of supported websites.
returns a full list of supported websites.
If you created a program that uses this API contact me and I will put it on this page!