Skip to content

Instantly share code, notes, and snippets.

@0xch4z
Created May 30, 2018 17:05
Show Gist options
  • Select an option

  • Save 0xch4z/f7549e620ecdbe38b971761e7d98ed70 to your computer and use it in GitHub Desktop.

Select an option

Save 0xch4z/f7549e620ecdbe38b971761e7d98ed70 to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
FFMPEG=$(which ffmpeg)
if ! [ -x "$(command -v ffmpeg)" ]; then
echo "ffmpeg is not installed\nrun:\n\t$ brew install ffmpeg"
exit 1
fi
in_file=$1
[[ $2 ]] && out_file=$2 || out_file=$1.mp4
$FFMPEG -i $in_file $out_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment