Created
July 30, 2017 17:18
-
-
Save stigok/27a4a289905344d77ccdfeb577696067 to your computer and use it in GitHub Desktop.
Convert a video file to a cross-browser HTML5 video compatible file format
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
#!/bin/bash | |
# Convert a video file to a cross-browser HTML5 video compatible file format | |
# | |
# Usage: vid2html5 <infile> [<outdir>] | |
# | |
# stigok jul 2017 | |
infile="$1" | |
timestamp=`date +'%Y-%m-%d-%H%M%S'` | |
outdir=${2:-.} | |
outfile=$outdir/$timestamp.mp4 | |
ffmpeg -loglevel warning -i "$infile" -an -vcodec libx264 -pix_fmt yuv420p -preset fast -profile:v baseline -movflags faststart $outfile | |
echo $outfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment