Last active
October 2, 2018 05:46
-
-
Save lemiorhan/87e98d7630a8e602199da2f568858458 to your computer and use it in GitHub Desktop.
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 | |
VIDEO_PATH=$1 | |
cd $VIDEO_PATH | |
echo "Video edit script is ready to run at $VIDEO_PATH" | |
for folder in `find . -mindepth 1 -type d` | |
do | |
cd $folder | |
if [[ -z $(ls -al | grep min.mp4) ]]; then | |
echo "======================= Processing ===:> Folder $(pwd)" | |
ffmpeg -f concat -safe 0 -i <(for f in ./*.MP4; do echo "file '$PWD/$f'"; done) -c copy output.mp4 | |
ffmpeg -i output.mp4 -b 8507k min.mp4 | |
rm output.mp4 | |
fi | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment