Command, HowTo

Youtube-dl commands


Youtube-dl is a pretty much goto solution for many users to download content from youtube, whether they want to backup their youtube channel content or want to download music youtube-dl covers all. Following are some widely used youtube-dl commands.

Get youtube link information without downloading it

The following command will get video link information (for example video title or duration) in JSON format without downloading the whole video.

youtube-dl -f 22/18/mp4/bestvideo -s -q --skip-download --dump-json --no-call-home youtubelink

Download video in mp4 with youtube-dl

youtube-dl -f mp4/best --recode-video mp4  --no-mtime --ffmpeg-location "ffmpeg/path/" -o "/file/output.%(ext)s" -i ""

Download video in mkv with youtube-dl

youtube-dl -f bestvideo+bestaudio/best/mp4 --no-mtime   --merge-output-format mkv --ffmpeg-location "ffmpeg/path/" -o "/file/output.%(ext)s" -i ""

Download video in mp3 audio format with youtube-dl

youtube-dl -x --audio-format mp3 --no-mtime --ffmpeg-location "ffmpeg/path/" -o "/file/output.%(ext)s" -i ""

Download video in aac audio format with youtube-dl

youtube-dl -x --audio-format aac --no-mtime --ffmpeg-location "ffmpeg/path/" -o "/file/output.%(ext)s" -i ""

Using proxy with youtube-dl

youtube-dl --proxy "socks5://" ""

Get all videos links in youtube playlist – output in json format

youtube-dl --flat-playlist --dump-single-json ""

Download private videos with a cookie file

For this you need a cookie text file, you can get that using an extension.

youtube-dl --cookies="/path/to/cookie-file.txt" ""

Download private video with account

youtube-dl --username "myname" --password "yourpassword" ""

If you have something to contribute or any question,please use comment box below.

Leave a Reply

Your email address will not be published. Required fields are marked *