Download from Youtube (useful yt-dlp commands)
to get the app:
https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
OR
pipx upgrade --pip-args=--pre yt-dlp
to get a list of available formats for a video:
./yt-dlp -F RsYPyPP7E2w
to get a specific format. Here we chose the audio-only 139:
./yt-dlp -f 139 OIdj5HnOnvU
to get a text list of all videos on a channel:
./yt-dlp --flat-playlist --print "%(id)s %(duration_string)s %(title)s" https://www.youtube.com/@ACGreviews/videos > Playlist_ACGreviews.txt
to get a list of a specific playlist on a channel:
yt-dlp --flat-playlist --print "%(channel)s %(id)s %(duration_string)s %(title)s" https://www.youtube.com/playlist?list=PLX34qDh_nH51NT3_eHghr8YOS_hFuG51O > Playlist_Name
to get the latest 20 videos on your account's subscription list:
./yt-dlp --cookies-from-browser firefox --flat-playlist -I :20 --print "%(id)s %(duration_string)s %(title)s" :ytsubs > MySubList.txt
OR (using a specific path for the browser. Usually not needed)
./yt-dlp --cookies-from-browser chrome:/root/.chrome/jwhi1dcg.default-esr/ --flat-playlist -I :20 --print "%(id)s %(duration_string)s %(title)s" :ytsubs > MySubList.txt
to get smallest/worst audio-video format combination:
./yt-dlp -S "+size" https://www.youtube.com/watch?v=VJDEA1ZauTk
the capital S here means Sort. It orders the available formats ascendingly, then downloads the first. You can also use "+size,lang" to avoid AI-generated audio dubs
Additional PRO commands:
./yt-dlp -S "+size" --merge-output-format mkv https://www.youtube.com/watch?v=qNVHs2DHNws
./yt-dlp --js-runtime quickjs:/mnt/sda3/yt0/qjs-linux-x86 --cookies-from-browser firefox:/root/.mozilla/firefox/jwhi1dcg.default-esr/ -S "+size,lang" https://www.youtube.com/watch?v=ADZKPcsbOX0
yt-dlp --js-runtime quickjs:/usr/local/bin/qjs --extractor-args "youtube:player_client=default,-android_sdkless" -F cnnE3gAPxiE
Yt_Dlp has MANY more options. save thumbnails, subtitles, etc. And it works with other sites too beside Youtube!
تعليقات
إرسال تعليق