Skip to content

Instantly share code, notes, and snippets.

@Yeshwanthyk
Last active February 15, 2021 05:10
Show Gist options
  • Save Yeshwanthyk/042cf680e99a6384ce6976db73f27d88 to your computer and use it in GitHub Desktop.
Save Yeshwanthyk/042cf680e99a6384ce6976db73f27d88 to your computer and use it in GitHub Desktop.
Youtube to Gif using youtubedl and ffmpeg
# 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
@Yeshwanthyk
Copy link
Author

youtube-dl --extract-audio --audio-format mp3 <link> - For saving mp3 from youtube

@Yeshwanthyk
Copy link
Author

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

@Yeshwanthyk
Copy link
Author

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