Last active
February 1, 2018 15:48
-
-
Save adekbadek/a85dca6220f25fbf6ddcfa4745c702cf to your computer and use it in GitHub Desktop.
some useful assets conversions for websites
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
# convert video to webm | |
# https://thethemefoundry.com/blog/convert-mp4-to-webm/ | |
ffmpeg -i myvideo.mp4 -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis myvideo.webm | |
# convert between image formats | |
convert myimg.png myimg.jpg | |
# convert images to webp | |
# https://www.npmjs.com/package/webp-converter-cli | |
# to convert all in current directory: | |
webpc -r | |
# get first frame of a video (useful for video posters) | |
# https://stackoverflow.com/a/44073745 | |
ffmpeg -i inputfile.mp4 -vf "select=eq(n\,0)" -q:v 3 outputimage.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment