image

Make Ogg

[<Back>] [<Edit>]

Automated Ogg encoder for my video Server

Environment: uBuntu Server 64bit all update installed. Install Steps. ----------------------Apt-Get---- sudo apt-get update sudo apt-get upgrade sudo apt-get -y install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev ffmpeg2theora dnotify php-pear php5-gd ffmpeg php5-ffmpeg lynx yum cpulimit gawk lsb-release usbmount mdadm perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl subversion libapache2-svn pear install Mail pear install Net_SOCKET pear install Net_SMTP ----------------------------------------- ----------------------Restore SQL---- mysql -uroot -p < restore_file.sql ----------------------------------------- ----------------------Config-Files---- #modify php.ini for upload size. /etc/php5/apache2/php.ini (POST_MAX & UPLOAD MAX) ----------------------------------------- ----------------------CPU_Limit.sh--- http://ubuntuforums.org/showthread.php?t=992706 ------------------------------------------- ----------------------clean_magicdir.sh--- #!/bin/sh find /var/www/magicdir/* -amin +60 -exec rm -rf {} ; ------------------------------------------- ---------------------- webmin module--- wget .deb dpkg -i .deb ------------------------------------------- ---------------------- disable ipv6 --- /etc/sysctl.conf #disable ipv6 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 ------------------------------------------- ---------------------- Make_ogg.sh --- #!/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