Skip to content

Instantly share code, notes, and snippets.

@bartjakobs
Last active July 18, 2017 12:43
Show Gist options
  • Save bartjakobs/262d8735ab3c9e2bf62ae0d76d95a632 to your computer and use it in GitHub Desktop.
Save bartjakobs/262d8735ab3c9e2bf62ae0d76d95a632 to your computer and use it in GitHub Desktop.
Media converters
# Simple audio / video converters for MacOS / Linux. Put in /usr/local/bin or any directory in your $PATH and chmod +x.
# Make sure ffmpeg and imagemagick are installed
#
# Download FFMPEG binaries here:
# https://evermeet.cx/ffmpeg/
#!/bin/bash
ffmpeg -i "$1" -vf scale=640:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 5 -loop 0 - "$1.gif"
#!/bin/bash
ffmpeg -i "$1" "$1.mp3"
#!/bin/bash
ffmpeg -i "$1" -vcodec h264 -profile:v main -level 4.0 "$1.mp4"
#!/bin/bash
ffmpeg -i "$1" -c:v libvpx -b:v 1M -c:a libvorbis "$1.webm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment