]>
code.delx.au - transcoding/blob - mkvmerge-set-chapters
3 if [ -z "$1" -o -z "$2" ]; then
4 echo "Usage: $0 videodir chapterdir destdir"
8 videodir
="$(cd "$1" && pwd)"
9 chapterdir
="$(cd "$2" && pwd)"
10 destdir
="$(cd "$3" && pwd)"
13 find .
-type f |
while read infile
; do
14 if [ ! -r "$infile" ]; then
15 echo "Missing file $infile"
19 outfile
="${destdir}/${infile}"
20 if [ -e "$outfile" ]; then
21 echo "Skipping $infile, it already exists in destination directory!"
25 chapterfile
="${chapterdir}/${infile}.chapters"
26 if [ ! -e "$chapterfile" ]; then
27 echo "Skipping $infile, no chapters!"
33 --chapters "${chapterfile}" \