Skip to content

Instantly share code, notes, and snippets.

@neodigm
Last active October 1, 2020 03:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neodigm/1eb8be6ce7d94e8b003d6566c8d5758b to your computer and use it in GitHub Desktop.
Save neodigm/1eb8be6ce7d94e8b003d6566c8d5758b to your computer and use it in GitHub Desktop.
Convert en masse all FLV videos to MP4 format (on Macbook). Credit Yu Arai.
#!/bin/sh
if [ $# -eq 1 ]; then
bitrate=$1
else
bitrate="400k"
fi
mkdir flv
for i in `ls *.flv`
do
ffmpeg -y -i ${i} -vcodec libx264 -b:v ${bitrate} -ac 2 -ar 44100 -ab 128k `basename ${i} .flv`.mp4
mv ${i} flv
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment