Ubuntu için Youtube dan toplu mp3 ve mp4 indirme işlemi:

Youtube dan video ve ya mp3 olarak toplu indirmeler için aşağıdaki yöntemi kullanabilirsiniz.
Dilerseniz Videolar kısmındaki linki kopyalayın; https://www.youtube.com/user/test/videos
Dilerseniz Oynatma Listelerindeki Linki kopyalayın; https://www.youtube.com/user/test/playlists

Dilediğiniz sayfanın videolarını dilediğiniz formatta topluca indirebilirsiniz.

İlk olarak youtube-dl paketini kurmalısınız.

$ apt-get install youtube-dl

Kanaldaki Playlist Linkini aldı iseniz:

$ youtube-dl –extract-audio –audio-format mp3 -o “%(title)s.%(ext)s” “https://www.youtube.com/watch?v=p4mzxe6llnsFn0&list=PLYxIQSbrfmyddBI8zvHcHFjm0MFpa2vy”

Kanaldaki Videolar linkini aldı iseniz:

$ youtube-dl –extract-audio –audio-format mp3 -o “%(title)s.%(ext)s” “https://www.youtube.com/user/test/videos”

Eger video olarak indirmek isterseniz aşağıdaki gibi komut girebilirsiniz:

$ youtube-dl “https://www.youtube.com/watch?v=s3VvKhoxdeg&list=PLBAT_aaJewU0mgh1K9vIU6FrpeoSKecPq”

Eğer indirme herhangi bir nedenle yarıda(örn. 29 da) kaldı ise:

$ youtube-dl –playlist-start 30 “https://link.com”

şeklinde devam debilirsiniz.

Video Kalitesini seçmek için:

$ youtube-dl -F “https://www.youtube.com/watch?v=Sx4Fho8Rg60&list=PfpuvdVJSOPLjdz0Esj6bNk6PeSfOpLP7”



[youtube:playlist] Downloading playlist PLpuvdVJSOPLjdz0E2j6bNk6PeSGIOpLP7 - add --no-playlist to just download video Cx4FPomRS60
[youtube:playlist] PLpuvdVJSOPLjdz0E2j6bNk6PeSGIOpLP7: Downloading webpage
[download] Downloading playlist: Yunus Emre "Aşkın Yolculuğu" | Tüm Bölümler
[youtube:playlist] playlist Yunus Emre "Aşkın Yolculuğu" | Tüm Bölümler: Downloading 43 videos
[download] Downloading video 1 of 43
[youtube] Cx4FPomRS60: Downloading webpage
[youtube] Cx4FPomRS60: Downloading video info webpage
[youtube] Cx4FPomRS60: Extracting video information
[youtube] Cx4FPomRS60: Downloading MPD manifest
[info] Available formats for Cx4FPomRS60:
format code extension resolution note
139 m4a audio only DASH audio 51k , m4a_dash container, mp4a.40.5@ 48k (22050Hz), 19.31MiB
249 webm audio only DASH audio 61k , opus @ 50k, 19.83MiB
250 webm audio only DASH audio 77k , opus @ 70k, 25.44MiB
171 webm audio only DASH audio 112k , vorbis@128k, 37.96MiB
140 m4a audio only DASH audio 131k , m4a_dash container, mp4a.40.2@128k (44100Hz), 51.58MiB
251 webm audio only DASH audio 149k , opus @160k, 49.36MiB
278 webm 256x144 144p 119k , webm container, vp9, 25fps, video only, 37.34MiB
160 mp4 256x144 DASH video 126k , avc1.4d400c, 25fps, video only, 45.13MiB
242 webm 426x240 240p 260k , vp9, 25fps, video only, 57.00MiB
133 mp4 426x240 DASH video 266k , avc1.4d4015, 25fps, video only, 99.86MiB
243 webm 640x360 360p 476k , vp9, 25fps, video only, 105.09MiB
134 mp4 640x360 DASH video 642k , avc1.4d401e, 25fps, video only, 148.46MiB
244 webm 854x480 480p 890k , vp9, 25fps, video only, 177.03MiB
135 mp4 854x480 DASH video 1180k , avc1.4d401e, 25fps, video only, 301.43MiB
247 webm 1280x720 720p 1839k , vp9, 25fps, video only, 358.18MiB
136 mp4 1280x720 DASH video 2390k , avc1.4d401f, 25fps, video only, 597.54MiB
248 webm 1920x1080 1080p 3300k , vp9, 25fps, video only, 678.05MiB
137 mp4 1920x1080 DASH video 4505k , avc1.640028, 25fps, video only, 1.12GiB
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k
36 3gp 320x180 small , mp4v.20.3, mp4a.40.2
43 webm 640x360 medium , vp8.0, vorbis@128k
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2@ 96k
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2@192k (best)

$ youtube-dl -f 137+140 http://www.youtube.com/watch?v=3JZ_D3ELwOQ

Daha ayrıntılı bilgiyi:
man youtube-dl ile edinebilirsiniz.

NOT:
“””ERROR: Signature extraction failed: Traceback (most recent call last):”””
hatası alırsanız aşağıdaki yüklemeleri yapın!!!

$ sudo apt-get install python-pip
$ sudo apt install – -upgrade youtube-dl
$ sudo pip install – -upgrade youtube-dl

ERROR:
[youtube:playlist] PLYxIQSbrfmhxsi8YN-JQGGODmdRvsgZdt: Downloading webpage
ERROR: Unable to extract title; 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.

Böyle bir hata alırsanız aşağıdaki gibi yeniden kurulum yapabilirsiniz:

$ sudo apt-get remove -y youtube-dl
$ sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl
$ sudo chmod a+x /usr/local/bin/youtube-dl

$ youtube-dl – -extract-audio – -audio-format mp3 -o “%(title)s.%(ext)s” “https://www.youtube.com/watch?v=pTe3Vfc6NB8g&list=PLYxIQShbrfmhxsi8YN-JQGGODmdRsvsgZdt”

OK.