added conversion to x.264 mp4

master
Marc Wäckerlin 10 years ago
parent 7aef0d2805
commit f6a262ff79
  1. 21
      src/tomp4.sh
  2. 6
      src/towebm.sh

@ -0,0 +1,21 @@
#! /bin/bash -ex
SRC=${1:-.}
DST=${2:-/var/tmp/spielfilme/mp4}
for f in $(find "$SRC" \( \( -name '.??*' -o -name '*.jpg' \) -prune \) -o -type f -print); do
t="${f/$SRC/$DST}"
t="${t%.*}.mp4"
if test -s "${t}"; then
continue;
fi
if ( ! test -s "${t}" ) && ( test -e "$t" ); then
rm "$t"
fi
test -d "${t%/*}" || mkdir -p "${t%/*}"
#avconv -i "$f" -vcodec libx264 -deinterlace -acodec libvo_aacenc "$t"
avconv -i "$f" -vcodec libx264 -acodec aac -strict experimental -deinterlace "$t"
if ( ! test -s "${t}" ) && ( test -e "$t" ); then
rm "$t"
fi
done

@ -1,7 +1,7 @@
#! /bin/bash #! /bin/bash
SRC="/var/data/spielfilme" SRC=${1:-.}
DST="/var/tmp/spielfilme/webm" DST=${2:-/var/tmp/spielfilme/webm}
for f in $(find "$SRC" \( -name '*.jpg' -prune \) -o -type f -print); do for f in $(find "$SRC" \( -name '*.jpg' -prune \) -o -type f -print); do
t="${f/$SRC/$DST}" t="${f/$SRC/$DST}"
@ -11,7 +11,7 @@ for f in $(find "$SRC" \( -name '*.jpg' -prune \) -o -type f -print); do
fi fi
test -d "${t%/*}" || mkdir -p "${t%/*}" test -d "${t%/*}" || mkdir -p "${t%/*}"
#ffmpeg -i "$f" -b 1500k -vcodec libvpx -acodec libvorbis -ab 160000 -f webm -g 30 "$t" #ffmpeg -i "$f" -b 1500k -vcodec libvpx -acodec libvorbis -ab 160000 -f webm -g 30 "$t"
avconv -i "$f" "$t" avconv -i "$f" -vcodec libvpx -acodec libvorbis -f webm -g 30 "$t"
if ( ! test -s "${t}" ) && ( test -e "$t" ); then if ( ! test -s "${t}" ) && ( test -e "$t" ); then
rm "$t" rm "$t"
fi fi

Loading…
Cancel
Save