Skip to content

Instantly share code, notes, and snippets.

@sathishvj
Created November 14, 2022 15:36
Show Gist options
  • Save sathishvj/8b291d8e396dce6bd484f0f136a9a5d4 to your computer and use it in GitHub Desktop.
Save sathishvj/8b291d8e396dce6bd484f0f136a9a5d4 to your computer and use it in GitHub Desktop.
Convert images and videos by extension using imagemagick and ffmpeg
function ffmpeg_ext() { ffmpeg -i "$1" "${1%.*}.$2"; } # ffmpeg_ext a.mp4 gif
function img_ext() { convert "$1" "${1%.*}.$2"; } # img_ext a.png jpeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment