]> git.phdru.name Git - audio-cdr-video.git/blobdiff - video/mplayer/m_encode_comments_a1
Move outdated scripts to separate subdirectories
[audio-cdr-video.git] / video / mplayer / m_encode_comments_a1
diff --git a/video/mplayer/m_encode_comments_a1 b/video/mplayer/m_encode_comments_a1
new file mode 100755 (executable)
index 0000000..2b365fe
--- /dev/null
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+if [ -z "$7" ]; then
+   echo "Usage: $0 title aid1 bitrate1 scale1 aid2 bitrate2 scale2 [menoder options]" >&2
+   exit 1
+fi
+
+title="$1"
+aid1="$2"
+bitrate1="$3"
+scale1="$4"
+aid2="$5"
+bitrate2="$6"
+scale2="$7"
+shift 7
+
+echo "INAM $title" | iconv -f koi8-r -t utf-8 >avi_comments.txt
+echo "ICMT Codec: FFmpeg (DivX5)" >>avi_comments.txt
+
+aid="$aid1" abitrate="$bitrate1" ascale="$scale1" m_encode "$@" &&
+m_extract_a1_comments "$aid2" -lameopts cbr:br=$bitrate2:q=0 -af volume="$scale2" "$@" &&
+mv output2.avi "$title".avi &&
+exec rm avi_comments.txt divx2pass.log a"$aid2".mp3 output.avi