Last active
December 25, 2020 08:38
-
-
Save taylor224/b6609a43ce6520ddafca to your computer and use it in GitHub Desktop.
M2T to MOV Script with FFMPEG
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
for DIR in */ ; do | |
echo "[ALERT] DIRECTORY - "$DIR; | |
cd $DIR; | |
for file in *.M2T *.m2t; | |
do | |
name=`echo $file | cut -d'.' -f1`; | |
if [ ! "$name" == "*" ]; | |
then | |
echo "[ALERT] File Name - "$name; | |
if [ ! -f $name.mov ]; | |
then | |
ffmpeg -i "$file" -f mov "$name.mov"; | |
else | |
echo "[ALERT] Already Encoded"; | |
fi | |
fi | |
done | |
cd ..; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requirement : FFMPEG
This script encode all M2T file to MOV file under current directory (1 depth).