image

Make Ogg

[<Back>] [<Edit>]

Automated ogg encoder for my video server

#!/bin/bash PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" FILE=/tmp/to_ogg.txt LOOP=1 TABLE_NAME=webLink USER_NAME= PASSWD= IP_ADDR=localhost LASTLOOP=$( cat $FILE | wc -l ) if ! ps ax | grep -v grep | grep ffmpeg2theor[a] > /dev/null then for (( LOOP=1; $LOOP<=$LASTLOOP; LOOP=((($LOOP+1)-1)) )) do if [[ -s $FILE ]]; then eval $( eval sed -n $LOOP"p" $FILE ) sed -i '1d' $FILE INPUT=$(sed -n $LOOP"p" $FILE) sed -i '1d' $FILE somevar=`echo "UPDATE Assets SET ogg='1' WHERE Asset_filename='$INPUT'" | mysql -h $IP_ADDR -u$USER_NAME -p$PASSWD $TABLE_NAME ` echo $somevar else exit 1 fi; done else echo "" #echo "FFmpeg2theora already running.." fi


By: Ted Simbajon





 
Instagram Stats
pinoy
my Kung Fu