[cvs-annodex] commit (/annodex): scripts/trunk/m2anx

conrad nobody at lists.annodex.net
Thu Sep 9 14:17:58 EST 2004


Update of /annodex (new revision 555)

Modified files:
   scripts/trunk/m2anx

Log Message:
add option to output to raw Ogg formats (ie. skip annodexing)


Modified: scripts/trunk/m2anx
===================================================================
--- scripts/trunk/m2anx	2004-09-09 03:49:42 UTC (rev 554)
+++ scripts/trunk/m2anx	2004-09-09 04:17:57 UTC (rev 555)
@@ -39,6 +39,7 @@
 
 video_codec="theora"
 audio_codec="vorbis"
+skip_anx=""
 
 AOPTS=""
 afopts=""
@@ -72,6 +73,9 @@
   echo >&2 "                              previous  frame"
   echo >&2 "  -x, --xy                    Scale video width"
   echo >&2
+  echo >&2 "Annodex options"
+  echo >&2 "  -S, --skip-annodexing       Skip annodexing step, output to Ogg"
+  echo >&2
   echo >&2 "Miscellaneous options"
   echo >&2 "  -h, --help                  Display this help and exit"
   echo >&2 "  -v, --verbose               Print informative messages"
@@ -183,11 +187,11 @@
 ############################################################
 
 GETOPTEST=`getopt --version`
-SHORTOPTS="no:hvA:r:c:V:dx:"
+SHORTOPTS="no:hvA:r:c:V:dx:S"
 
 case $GETOPTEST in
 getopt*) # GNU getopt
-  TEMP=`getopt -l dry-run -l output:: -l verbose -l version -l help -l audio-codec:: -l resample:: -l channels:: -l video-codec:: -l decimate -l xy:: -- +$SHORTOPTS $@`
+  TEMP=`getopt -l dry-run -l output:: -l verbose -l version -l help -l audio-codec:: -l resample:: -l channels:: -l video-codec:: -l decimate -l xy:: -l skip-annodexing -- +$SHORTOPTS $@`
   ;;
 *) # POSIX getopt ?
   TEMP=`getopt $SHORTOPTS $@`
@@ -239,6 +243,9 @@
       VOPTS="$VOPTS -zoom -xy $1"
       append_vfopt scale
       ;;
+    -S|--skip-annodexing)
+      skip_anx="yes"
+      ;;
   esac
   shift
 done
@@ -268,8 +275,13 @@
 AUDIO="$WORKDIR/audiodump.wav"
 VIDEO="$WORKDIR/stream.yuv"
 
-OGGOUT=$WORKDIR/$BASE.ogg
-SPXOUT=$WORKDIR/$BASE.spx
+if test "x$skip_anx" = "xyes" ; then
+  OGGOUT=$OUTDIR/$BASE.ogg
+  SPXOUT=$OUTDIR/$BASE.spx
+else
+  OGGOUT=$WORKDIR/$BASE.ogg
+  SPXOUT=$WORKDIR/$BASE.spx
+fi
 
 ANXOUT=$OUTDIR/$BASE.anx
 
@@ -357,6 +369,7 @@
 ## Annodex
 ############################################################
 
+do_annodex () {
 anx_inputs=""
 
 if test -e $CMMLIN ; then
@@ -391,6 +404,9 @@
     "anxenc $anx_inputs -o $ANXOUT"
 
 verbose_echo "Wrote $ANXOUT"
+}
 
+if test "x$skip_anx" = "x" ; then do_annodex; fi
+
 # Set exit status to 0
 stat=0


-- 
conrad



More information about the cvs-annodex mailing list