From 4cc76f658514494bdde240ad674527e13a8a627b Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sun, 23 Jul 2023 07:22:48 +0300 Subject: [PATCH] Updated YouTube (markdown) --- YouTube.md | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/YouTube.md b/YouTube.md index 4ba6d51..5f52f37 100644 --- a/YouTube.md +++ b/YouTube.md @@ -5,10 +5,43 @@ - Ignores unavailable videos - Using https://github.com/yt-dlp/yt-dlp -## Install on Debian or Ubuntu based Linux +## Install on macOS + +1. Install vlc and yt-dlp: +``` +brew install vlc yt-dlp +``` +2. Edit .zshrc: +``` +nano .zshrc +``` +3. Add there this. (noglob option make possible that there is no no need to add escape backslash before `?` in YouTube URL) +``` +alias yd="noglob /opt/homebrew/bin/yt-dlp -f 'bv+ba/b' --sub-langs all,-live_chat --compat-options no-youtube-unavailable-videos --audio-multistreams --video-multistreams --no-clean-infojson --embed-subs" +``` +4. Save and Exith with Ctrl-o Enter Ctrl-x + +5. In new terminal download YouTube video or channel, and then play video: +``` +yd https://youtube.com/.... + +vlc "filename.webm" +``` + +## Install on New Debian or Ubuntu based Linux ``` -sudo apt install python3-pip ffmpeg +sudo apt-get -y install vlc yt-dlp +``` +Add to .bashrc: +``` +alias yd="~/.local/bin/yt-dlp -f 'bv+ba/b' --sub-langs all,-live_chat --compat-options no-youtube-unavailable-videos --audio-multistreams --video-multistreams --no-clean-infojson --embed-subs" +``` + +## Install on old Debian or Ubuntu based Linux + +``` +sudo apt-get -y install vlc python3-pip ffmpeg pip3 install pip --upgrade --user