Skip to content

Instantly share code, notes, and snippets.

@toshinarin
Created September 20, 2016 06:21
Show Gist options
  • Save toshinarin/f2be33581a74b1d08845c0244a584368 to your computer and use it in GitHub Desktop.
Save toshinarin/f2be33581a74b1d08845c0244a584368 to your computer and use it in GitHub Desktop.
#!/bin/bash
FILENAME=$1
if [ ! -n "${FILENAME}" ]; then
echo "Please specify input file"
exit 1
fi
ffmpeg -y -i ${FILENAME} -preset slower -c:v libx264 -b:v 320k -pass 1 -an -f mp4 /dev/null && ffmpeg -y -i ${FILENAME} -c:v libx264 -preset slower -b:v 320k -pass 2 -an "${FILENAME%.*}.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment