#!/bin/bash # # Date: 2009-12-16 # Author: Ole Kristian Lien # License: GNU General Public License # # Joins together two or more video-files EXT=`echo "$1"|awk -F . '{print $NF}'` NAME=`basename $1 .$EXT` if [ -z "$3" ]; then echo "Usage: $0 [...]" exit 1 fi array=() for arg in $*; do array[${#array[*]}]=$arg done # remove first entry unset array[0] # todo: Concatenating works with MPEG-1, MPEG-2 PS and DV if [ $EXT == "dv" ] ; then echo -n " * Joining video-files using cat..." cat ${array[*]} > $1 else # elsif ext hdv video - m2t echo -n " * Joining video-files using mencoder..." mencoder -oac copy -ovc copy -idx -o $1 ${array[*]} > "$NAME.log" 2>&1 #rm $NAME.log fi echo -e "OK!" # mencoder må hyssje! # -quiet