From 1a9de96761728785e7e0e645a1692c70d93be40f Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Tue, 16 Apr 2013 15:10:01 +0200 Subject: [PATCH] bzr2git conversion script, direct mp4 to mp3 converter --- bzr2git.sh | 28 ++++++++++++++++++++++++++++ mp3lame4.sh | 12 ++++++++++++ mp42mp3.sh | 11 +++++++++++ mp42mp3_V4.sh | 11 +++++++++++ 4 files changed, 62 insertions(+) create mode 100755 bzr2git.sh create mode 100755 mp3lame4.sh create mode 100755 mp42mp3.sh create mode 100755 mp42mp3_V4.sh diff --git a/bzr2git.sh b/bzr2git.sh new file mode 100755 index 0000000..8f52621 --- /dev/null +++ b/bzr2git.sh @@ -0,0 +1,28 @@ +#!/bin/bash +PWD=`pwd` +DIRNAME=`basename "$PWD"` +GITDIR="../$DIRNAME.GIT" +echo "Processing: $DIRNAME" +if [ ! -d ".bzr" ]; then + echo "No .bzr directory here. Is this a BZR branch?" + exit 1 +fi +if [ -d "$GITDIR" ]; then + echo "$GITDIR already exists. Rename it and try again." + exit 2 +fi +echo "Creating bzr-git repo in $GITDIR" +mkdir "$GITDIR" +bzr init --format=git "$GITDIR" +echo "Pushing revisions to $GITDIR" +bzr dpush "$GITDIR" +echo "cd'ing" +cd "$GITDIR" +echo "Fixing branch" +git branch master +git checkout master +echo "Resetting branch" +git reset --hard HEAD +echo "cd'ing back" +cd - +echo "All done." diff --git a/mp3lame4.sh b/mp3lame4.sh new file mode 100755 index 0000000..8b01359 --- /dev/null +++ b/mp3lame4.sh @@ -0,0 +1,12 @@ +#!/bin/sh +if [ "$#" = "0" ]; then + echo "Usage: $0 file1 [file2 file3 ... fileN]" + exit 1 +fi + +while [ "$#" -gt 0 ]; do + echo "Processing $1 ($# more left)..." + #lame -m j --replaygain-fast --preset extreme -q 4 --vbr-new -V 4 -o --id3v2-only "$1" "$1.mp3" + lame -m j --replaygain-fast --vbr-new -V 4 -o --id3v2-only --resample 44.1 "$1" "$1.mp3" + shift +done diff --git a/mp42mp3.sh b/mp42mp3.sh new file mode 100755 index 0000000..a07f23d --- /dev/null +++ b/mp42mp3.sh @@ -0,0 +1,11 @@ +#!/bin/sh +if [ "$#" = "0" ]; then + echo "Usage: $0 file1 [file2 file3 ... fileN]" + exit 1 +fi + +while [ "$#" -gt 0 ]; do + echo "Processing $1 ($# more left)..." + avconv -i "$1" -f wav -vn - | lame -m j --replaygain-fast --vbr-new -V 2 -o --id3v2-only --resample 44.1 - "$1.mp3" + shift +done diff --git a/mp42mp3_V4.sh b/mp42mp3_V4.sh new file mode 100755 index 0000000..c8bffbb --- /dev/null +++ b/mp42mp3_V4.sh @@ -0,0 +1,11 @@ +#!/bin/sh +if [ "$#" = "0" ]; then + echo "Usage: $0 file1 [file2 file3 ... fileN]" + exit 1 +fi + +while [ "$#" -gt 0 ]; do + echo "Processing $1 ($# more left)..." + avconv -i "$1" -f wav -vn - | lame -m j --replaygain-fast --vbr-new -V 4 -o --id3v2-only --resample 44.1 - "$1.mp3" + shift +done