}
+#------------------------------------------------------------------------------
+MV() {
+
+ if [[ "${VERBOSE}" == "y" ]] ; then
+ info "Ausführen: mv $*"
+ fi
+ if [[ "${SIMULATE}" != "y" ]] ; then
+ mv -v "$@"
+ fi
+
+}
+
#------------------------------------------------------------------------------
info() {
echo -e " ${GREEN}*${NORMAL} [$(my_date)] [${BASENAME}:${GREEN}INFO${NORMAL}] : $@"
info "Vorbereitungen ..."
local workdir=$( dirname "${TGT_MOVIE}" )
- # TMP_MOVIE=$( mktemp --tmpdir="${workdir}" tmp.XXXXXXXX.avi )
- # debug "Temporäre Film-Datei: '${TMP_MOVIE}'."
+ local tgt_basename=$( basename "${TGT_MOVIE}" )
+ TMP_MOVIE=$( mktemp --tmpdir="${workdir}" ".~tmp.XXXXXXXX.${tgt_basename}" )
+ debug "Temporäre Film-Datei: '${TMP_MOVIE}'."
trap cleanup EXIT TERM HUP INT
info "Schritt 3: Konvertiere Video-Stream zu XVID, ${GREEN}Schritt 2${NORMAL}."
echo
sleep 1
- local cmd="mencoder \"${SRC_MOVIE}\" -of avi -o \"${TGT_MOVIE}\""
+ local cmd="mencoder \"${SRC_MOVIE}\" -of avi -o \"${TMP_MOVIE}\""
cmd+=" -oac mp3lame -lameopts vbr=3 -af volnorm=1"
cmd+=" -ovc xvid -xvidencopts pass=2"
if [[ "${BITRATE}" -ne 0 ]] ; then
do_cmd "${cmd}"
+ echo
+ echo "#-------------------------------------------------------------------"
+ echo
+ MV "${TMP_MOVIE}" "${TGT_MOVIE}"
+
}
#------------------------------------------------------------------------------