Last active
April 20, 2016 07:27
-
-
Save felixgirault/0632f68afedc05d3c8308ab21e45118d to your computer and use it in GitHub Desktop.
Download audio from videos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cclive \ | |
--stream best \ | |
--filename-format "%t" \ | |
--exec 'echo "Converting to audio..."' \ | |
--exec 'ffmpeg -loglevel warning -i "%f" -codec copy -map 0:a "%n.mp4"' \ | |
--exec 'echo "Cleaning temp file..."' \ | |
--exec 'rm "%f"' \ | |
--exec 'echo "You can now listen to %t.mp4' \ | |
"$1" \ | |
/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script requires
cclive
andffmpeg
.You can alias it in your
.zshrc
:And then use it like that:
dla "https://www.youtube.com/watch?v=aFY5fXAfvG4"
It will download the audio and save it as a
.mp4
file named after the video title, right where you run the command.