Skip to content

Instantly share code, notes, and snippets.

@bytefade
Last active January 8, 2016 18:17
Show Gist options
  • Save bytefade/462c2e0712d79ce14b39 to your computer and use it in GitHub Desktop.
Save bytefade/462c2e0712d79ce14b39 to your computer and use it in GitHub Desktop.
Convert all video from directory with FFMPEG
#!/bin/bash
#
#RUN: find ../uploads/videos/ -iname "*.mp4" -exec ./ffmpeg.sh {} ";"
dir_atual=$(dirname $1)
filename=$(basename $1)
extension=${filename##*.}
filename=${filename%.*}
ffmpeg -i $1 -threads 0 -strict experimental -f mp4 -vcodec libx264 -s 1280x720 $dir_atual/${filename}.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment