added conversion to x.264 mp4

master
Marc Wäckerlin 9 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
SRC="/var/data/spielfilme"
DST="/var/tmp/spielfilme/webm"
SRC=${1:-.}
DST=${2:-/var/tmp/spielfilme/webm}
for f in $(find "$SRC" \( -name '*.jpg' -prune \) -o -type f -print); do
t="${f/$SRC/$DST}"
@ -11,7 +11,7 @@ for f in $(find "$SRC" \( -name '*.jpg' -prune \) -o -type f -print); do
fi
test -d "${t%/*}" || mkdir -p "${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
rm "$t"
fi

Loading…
Cancel
Save