Skip to main content

Video Download Tool - youtube-dl

Youtube-dl is a very useful tool which can be used to download videos from many supported sites. You can find the list of sites supported in this link. I thought to share some of the useful codes that can be used to download videos from various popular sites.
Download and installation instructions and documentation.


Useful commands:

Suppress output, error messages and download in background
[pre class="brush:bash"]
nohup youtube-dl https://www.youtube.com/***** -i &
[/pre]
Download the videos listed in a text file
[pre class="brush:bash"]
nohup youtube-dl -a down.txt -i &
[/pre]
Download the highest quality video
[pre class="brush:bash"]
nohup youtube-dl -f 22 -a down.txt -i &
[/pre]
download the highest quality video
[pre class="brush:bash"]
nohup youtube-dl -f 22 -a down.txt -i &
[/pre]
download the playlist and start from 1
[pre class="brush:bash"]
nohup youtube-dl -f 22 -a down.txt --playlist-start 1 -i &
[/pre]
download the highest quality video (even 1080p) - this requires installation of avconv or ffmpeg
[pre class="brush:bash"]
nohup youtube-dl -f bestvideo+bestaudio -a down.txt -i &
[/pre]
extract the audio only
[pre class="brush:bash"]
nohup youtube-dl https://www.youtube.com/jkIeAuOWdFRwF -x --audio-format "mp3" --audio-quality 0 --playlist-start 29 -i &
[/pre]
download the best quality video and audio separately and combine them
[pre class="brush:bash"]
nohup youtube-dl -f bestvideo+bestaudio -a down.txt -i &
[/pre]
download the best quality video and audio separately and combine them into a mp4 format
[pre class="brush:bash"]
nohup youtube-dl -f bestvideo+bestaudio -a down.txt --merge-output-format "mp4" -R "infinite" --prefer-avconv -i &
[/pre]
code to testing the video link (this outputs the available formats and other parameters)
[pre class="brush:bash"]
youtube-dl link -F --skip-download -v
[/pre]
another way to download the high quality video is to identify the video format using the above command and use them in the callback
[pre class="brush:bash"]
nohup youtube-dl -f 137+140 -a down.txt --merge-output-format "mp4" -R "infinite" --socket-timeout 5000 -i &
[/pre]
playlist download (working)
[pre class="brush:bash"]
nohup youtube-dl -f 137+140 -a down.txt --playlist-start 18 --playlist-end 24 --merge-output-format "mp4" -R "infinite" -i &
[/pre]
auto numbering
[pre class="brush:bash"]
nohup youtube-dl -a down --autonumber-start 1 -o '%(autonumber)s_%(title)s.%(ext)s' &
[/pre]
it is difficult or impossible to install ffmpeg in osmc, use following command to install avconv
[pre class="brush:bash"]
sudo apt-get install libav-tools
[/pre]
copying the file at a regular interval to another drive in the background
[pre class="brush:bash"]
while true; do sleep 1800; mv *.mp4 /sda1/data; done &
[/pre]
[pre class="brush:bash"][/pre]

Comments

Popular posts from this blog

How to Safely Uninstall Python from Mac OS X

Mac Laptops comes with Python pre-installed, but if you install another version of Python probably from www.python.org it might interfere with the default Python installation. Thus it is recommended to install other Python versions through Homebrew or mac ports.

Advantages and Disadvantages of Electro-oculography (EOG)

In the previous post we looked at what is EOG? In this post we will look at the advantages and disadvantages of EOG.

What is your Lucky Colour?

Colours and You
Which colour can bring you luck and enhance your day? This can be identified by calculating the birth number,