#!/bin/bash # # 2010, Calin-Andrei Burloiu, calin.burloiu@gmail.com # # This scripts converts all mts files to avi starting from a root directory # recursively. The avi files are placed in the same directory as the # original mts files. # if [ $# -ne 1 ]; then echo "usage: $0 root_path" fi root_path="$1" for i in $(find "$root_path" -name "*.mts"); do #echo $(dirname $i)/$(basename $i .mts).avi ./ffmpeg-mts2avi "$i" "$(dirname $i)/$(basename $i .mts).avi" done