From 56464781841b340c5fa80229032cb75f6e05611e Mon Sep 17 00:00:00 2001 From: root Date: Tue, 15 Feb 2011 15:44:37 +0200 Subject: [PATCH] ffmpeg-all-mts2mp4-custom added --- ffmpeg-all-mts2mp4-custom | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 ffmpeg-all-mts2mp4-custom diff --git a/ffmpeg-all-mts2mp4-custom b/ffmpeg-all-mts2mp4-custom new file mode 100755 index 0000000..93fac50 --- /dev/null +++ b/ffmpeg-all-mts2mp4-custom @@ -0,0 +1,23 @@ +#!/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" + +( +IFS=$'\n' +for filename in $(find "$root_path" -name '*.mts'); do + new_filename=$(dirname "$filename")/$(basename "$filename" .mts).avi + rm "$new_filename" + ./ffmpeg-mts2mp4-custom "$filename" "$new_filename" 1440x1080 1400k +done +) -- 2.20.1