Created
January 8, 2016 19:09
-
-
Save bytefade/08f83b0b556d1d64ab39 to your computer and use it in GitHub Desktop.
ffmpeg convert and rename
This file contains hidden or 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 | |
# | |
#RUN: find ../uploads/videos/ -iname "*.mp4" -exec ./ffmpeg.sh {} ";" | |
dir_atual=$(dirname $1) | |
filename=$(basename $1) | |
extension=${filename##*.} | |
filename=${filename%.*} | |
cp $dir_atual/${filename}.mp4 $dir_atual/${filename}.old.mp4 | |
mv $dir_atual/${filename}.mp4 $dir_atual/${filename}.bkp.mp4 | |
#overrwrite -y | |
ffmpeg -i $dir_atual/${filename}.old.mp4 -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