Last active
February 15, 2021 05:10
-
-
Save Yeshwanthyk/042cf680e99a6384ce6976db73f27d88 to your computer and use it in GitHub Desktop.
Youtube to Gif using youtubedl and ffmpeg
This file contains hidden or 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
# brew install youtube-dl (or) my preferred way is to set it up using pip in a virtualenv | |
# brew install ffmpeg | |
youtube-dl -g "URL" | |
# START TIME/END TIME HH:MM:SS | |
ffmpeg -i "FIRST URL FROM ABOVE" -r 15 -vf scale=512:-1 -ss <START TIME> -to <END TIME> <the name you want>.gif |
ffmpeg -ss 30 -t 70 -i inputfile.mp3 -acodec copy outputfile.mp3
-ss
start time in seconds/hh:mm:ss
-t
seconds to cut
Trim a song
wget -nd -H -p -A jpg,jpeg,png,gif -e robots=off <url>
- grab all images from webpage
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
youtube-dl --extract-audio --audio-format mp3 <link>
- For saving mp3 from youtube