Skip to content

Instantly share code, notes, and snippets.

@outsidecontext
Created January 23, 2020 10:01
Show Gist options
  • Select an option

  • Save outsidecontext/9d81940d43227ca0b6215c3b2642209e to your computer and use it in GitHub Desktop.

Select an option

Save outsidecontext/9d81940d43227ca0b6215c3b2642209e to your computer and use it in GitHub Desktop.
Convert all videos in the working directory to h264 mp4s
#!/bin/bash
files=./*
index=0
for f in $files
do
d=`date +%Y%d%m-%H%M%S`
echo "Converting $f to $d.mp4"
ffmpeg -i $f -vcodec h264 -acodec aac -strict -2 $d.mp4
((++index))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment