Skip to content

Instantly share code, notes, and snippets.

@nickcheng
Last active June 26, 2017 04:03
Show Gist options
  • Save nickcheng/4e8f8b9e3f85931dd0714539cefbfced to your computer and use it in GitHub Desktop.
Save nickcheng/4e8f8b9e3f85931dd0714539cefbfced to your computer and use it in GitHub Desktop.
Get audio from youtube video
# Download only audio from a Youtube link.
youtube-dl -f 'bestaudio' https://www.youtube.com/video
# Get the details of the file.
ffprobe file.mp4
# Get audio part from the input video file.
ffmpeg -i input.mp4 -vn -acodec copy output.aac
# Encode input file type to output type.
ffmpeg -i input.webm output.m4a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment