Skip to content

Instantly share code, notes, and snippets.

@Noitidart
Last active October 8, 2021 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Noitidart/22cedf4a82e6636a337a56a6a8940d65 to your computer and use it in GitHub Desktop.
Save Noitidart/22cedf4a82e6636a337a56a6a8940d65 to your computer and use it in GitHub Desktop.
@Noitidart
Copy link
Author

macros.doskey - https://superuser.com/questions/1134368/create-permanent-doskey-in-windows-cmd/1134468#1134468

yt=C:\Users\Mercurius\Music\youtube-dl.exe -x --audio-format mp3 -f bestaudio "https://www.youtube.com/watch?v=$1"
ytv=C:\Users\Mercurius\Music\youtube-dl.exe --version
ytu=C:\Users\Mercurius\Music\youtube-dl.exe -U

@Noitidart
Copy link
Author

@Noitidart
Copy link
Author

Mac installation:

  1. brew install youtube-dl
  • verify installation with youtube-dl --version
  1. brew install ffmpeg

Then you can use the command above.

@Noitidart
Copy link
Author

Noitidart commented Jan 12, 2020

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"

@Noitidart
Copy link
Author

Noitidart commented Sep 19, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment