From 016841f961ad53a3f9c08df793200aa9c7674125 Mon Sep 17 00:00:00 2001 From: p2p Date: Mon, 7 Mar 2011 12:14:56 +0200 Subject: [PATCH] modified mp4 converters --- ffmpeg-all-mts2mp4-custom | 9 ++++++--- ffmpeg-mts2mp4-custom | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ffmpeg-all-mts2mp4-custom b/ffmpeg-all-mts2mp4-custom index 93fac50..8caa47a 100755 --- a/ffmpeg-all-mts2mp4-custom +++ b/ffmpeg-all-mts2mp4-custom @@ -13,11 +13,14 @@ fi root_path="$1" +resolution=960x720 # HD +#resolution=800x600 # SD + ( IFS=$'\n' -for filename in $(find "$root_path" -name '*.mts'); do - new_filename=$(dirname "$filename")/$(basename "$filename" .mts).avi +for filename in $(find "$root_path" -name '*.MTS'); do + new_filename=$(dirname "$filename")/$(basename "$filename" .MTS)_HD.mp4 rm "$new_filename" - ./ffmpeg-mts2mp4-custom "$filename" "$new_filename" 1440x1080 1400k + ./ffmpeg-mts2mp4-custom "$filename" "$new_filename" $resolution 1400k done ) diff --git a/ffmpeg-mts2mp4-custom b/ffmpeg-mts2mp4-custom index 4a9f4b6..334407a 100755 --- a/ffmpeg-mts2mp4-custom +++ b/ffmpeg-mts2mp4-custom @@ -22,5 +22,5 @@ if test ! -f "$MTS_FILE"; then exit 1 fi -$FFMPEG -i "$MTS_FILE" -f mp4 -acodec libmp3lame -ab 256k -ar 44100 -ac 2 -vcodec libx264 -vpre normal -b "$BITRATE" -r 25 -s "$RESOLUTION" -threads 0 "$AVI_FILE" +$FFMPEG -i "$MTS_FILE" -f mp4 -acodec libmp3lame -ab 192k -ar 44100 -ac 2 -vcodec libx264 -vpre normal -b "$BITRATE" -r 25 -s "$RESOLUTION" -threads 0 "$AVI_FILE" -- 2.20.1