summaryrefslogtreecommitdiffstats
path: root/convert2mp4
diff options
context:
space:
mode:
authorFlorian Pritz <f-p@gmx.at>2009-04-18 20:49:57 +0200
committerFlorian Pritz <f-p@gmx.at>2009-04-18 20:49:57 +0200
commitba8388ab9b0a0c393496b745866e97738b0fdac9 (patch)
treee14b3b8f5222d828a87cd435548fb4b843782a84 /convert2mp4
parent87febf5bfa38abefb7bbaa87f8d24f697b92d3fe (diff)
downloadbin-ba8388ab9b0a0c393496b745866e97738b0fdac9.tar.gz
bin-ba8388ab9b0a0c393496b745866e97738b0fdac9.tar.xz
convert2mp4 accepts multiple files now
Diffstat (limited to 'convert2mp4')
-rwxr-xr-xconvert2mp418
1 files changed, 11 insertions, 7 deletions
diff --git a/convert2mp4 b/convert2mp4
index 60a82a1..dde121e 100755
--- a/convert2mp4
+++ b/convert2mp4
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
#----------------------------------------------------
-# Version: 0.1.0
+# Version: 0.1.1
# Author: Florian "Bluewind" Pritz <f-p@gmx.at>
#
# Copyright (C) 2009 Florian Pritz
@@ -14,10 +14,14 @@
# Audio: MPEG-4 AAC
#----------------------------------------------------
-cd "$(dirname $1)"
+for i in $@; do
+ pushd . &> /dev/null
+ cd "$(dirname "$i")"
-file="$(basename $1)"
-file_mp4="$(echo ${file} | sed 's/\(.*\)\..*/\1/').mp4"
+ file="$(basename "$i")"
+ file_mp4="$(echo ${file} | sed 's/\(.*\)\..*/\1/').mp4"
-ffmpeg -i "$file" -b 400000 -deinterlace -vcodec libx264 -s 720x576 -r 25 -g 250 -keyint_min 25 -coder ac -me_range 16 -subq 5 -sc_threshold 40 -acodec libfaac -ab 160000 -ar 44100 -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -i_qfactor 0.71 -b_strategy 1 -threads 2 -crf 30 -y "$file_mp4"
-qt-faststart "$file_mp4" "upload_$file_mp4"
+ ffmpeg -i "$file" -b 400000 -deinterlace -vcodec libx264 -s 720x576 -r 25 -g 250 -keyint_min 25 -coder ac -me_range 16 -subq 5 -sc_threshold 40 -acodec libfaac -ab 160000 -ar 44100 -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -i_qfactor 0.71 -b_strategy 1 -threads 2 -crf 30 -y "$file_mp4"
+ qt-faststart "$file_mp4" "done_$file_mp4"
+ popd &> /dev/null
+done