Skip to content

Instantly share code, notes, and snippets.

@taylor224 taylor224/encode.sh
Last active Aug 29, 2015

Embed
What would you like to do?
M2T to MOV Script with FFMPEG
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
@taylor224

This comment has been minimized.

Copy link
Owner Author

commented Feb 21, 2015

Requirement : FFMPEG

This script encode all M2T file to MOV file under current directory (1 depth).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.