- Install tool - https://www.videohelp.com/software/youtube-dl
- Install ffmpeg and add it to path - https://ffmpeg.org/download.html
youtube-dl.exe -x --audio-format mp3 -f bestaudio "https://www.youtube.com/watch?v=c2gSzYLJ8sY"
youtube-dl.exe -x --audio-format mp3 -f bestaudio "https://www.youtube.com/watch?v=c2gSzYLJ8sY"
Mac installation:
brew install youtube-dl
youtube-dl --version
brew install ffmpeg
Then you can use the command above.
Download video: youtube-dl --recode-video mp4 WlWlGlvN4L4
Trimming video: ffmpeg -ss 00:00:18 -to 00:05:59 -i "input.mp4" -c copy "output.mp4"
Adding yt to mac:
vim ~/.bash_profile
function yt {
youtube-dl -x --audio-format mp3 -f bestaudio "$1" -o '~/Music/%(artist)s - %(track)s.%(ext)s'
}
source ~/.bash_profile
macros.doskey - https://superuser.com/questions/1134368/create-permanent-doskey-in-windows-cmd/1134468#1134468