瀏覽代碼

Just use mkv

Zachary Kotlarek 14 年之前
父節點
當前提交
3337cc31ce
共有 2 個文件被更改,包括 5 次插入 和 10 次删除
  1. 1 1
      folderToMov.sh
  2. 4 9
      toMov.sh

+ 1 - 1
folderToMov.sh

@@ -44,7 +44,7 @@ inFolder="`cd "${inFolder}" && pwd`"
 cd "${inFolder}"
 
 # Cycle through the folder looking for certain video files that should be converted to better containers
-for i in *.[aA][vV][iI] *.[wW][mM][vV] *.[mM][kK][vV] *.[dD][iI][vV][xX] *.[fF][lL][vV]; do
+for i in *.[aA][vV][iI] *.[wW][mM][vV] *.[dD][iI][vV][xX] *.[fF][lL][vV]; do
 	# Construct the full path
 	file="${inFolder}/${i}"
 

+ 4 - 9
toMov.sh

@@ -37,21 +37,16 @@ if [ -z "${outFile}" ]; then
 	outFile="`dirname "${inFile}"`/${outFile}"
 fi
 
-# Convert to MOV or MKV
+# Convert to MKV
 tmpFile="`mktemp -t toMov`"
-if which catmovie > /dev/null 2>&1; then
-	outFile="${outFile}.mov"
-	catmovie -q -self-contained -o "${tmpFile}" "${inFile}" 2>/dev/null
-elif which mkvmerge > /dev/null 2>&1; then
-	outFile="${outFile}.mkv"
-	mkvmerge -o "${tmpFile}" "${inFile}"
-fi
+outFile="${outFile}.mkv"
+mkvmerge -o "${tmpFile}" "${inFile}"
 
 # Check for errors
 if [ ! -e "${tmpFile}" ] || [ `stat -f '%z' "${tmpFile}"` -lt 1000 ]; then
 	echo "`basename "${0}"`: Error creating output file for input: ${inFile}" 1>&2
 
-	# Try to recode (with Handbrake/ffmpeg) if catmovie/mkvmerge fails
+	# Try to recode (with Handbrake/ffmpeg) if mkvmerge fails
 	echo "`basename "${0}"`: Attempting recode instead..." 1>&2
 	~/bin/video/recode "${inFile}"
 	exit "${?}"