Skip to content

Instantly share code, notes, and snippets.

@borisschapira
Last active February 9, 2018 18:37
Show Gist options
  • Save borisschapira/9c4e4eb8d109c57a8533cd28d87a2b08 to your computer and use it in GitHub Desktop.
Save borisschapira/9c4e4eb8d109c57a8533cd28d87a2b08 to your computer and use it in GitHub Desktop.
Config ffmpeg pour réencoder mes vidéos (gain de ~10x par rapport à la sortie de mon tél, ~5x par rapport à au Sony N5)
ffmpegboris() {
ffmpeg -i $1 -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k -movflags +faststart -vf scale=-2:720,format=yuv420p $1.optimized.mp4
}
ffmpegborisall () {
for i in *.(AVI|MP4|MOV|mov|mp4); do
if [[ ${i} != *"optimized"* ]];then
ffmpegboris $i;
fi
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment