The Answer to Life, the Universe, and Everything

Tuesday, May 27, 2008

Flv file convert

Flv file convert to music format

.flv to mp3
$ ffmpeg -i xxx.flv -vn -acodec aac -ab 128k -ac 2 -ar 44100 -y test.mp3


.flv to aac
$ ffmpeg -i xxx.flv -vn -acodec mp3 -ab 128k -ac 2 -ar 44100 -y test.mp3


.flv to mp4
$ ffmpeg -bitexact -y -i OLD_TOWN.flv -vcodec mpeg4 -s 320x240 -r 25 -b 480k -acodec aac -ac 2 
-ar 22050 -ab 69k out.mp4


To cut mp3 then
$ sudo apt-get install poc-streamer
#mp3cut [ -o outputfile ] [ -T title ] [ -A artist ] [ -N album-name ]
[ -t [hh:]mm:ss[+ms]-[hh:]mm:ss[+ms] ] mp3file [[ -t … ] mp3file1 …]

$ mp3cut -o cut.mp3 -t 00:08-00:49 test.mp3

Wednesday, May 21, 2008

Awstats for Ubuntu

awstats is log analyzer I use it for tomcat log analysis.

<Host name="localhost" appBase="webapps" >
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="ich_access_log."
suffix=".txt" pattern="combined" resolveHost="false" / >
</Host >


Setting for awstats

cp -r /usr/share/awstats/icon /var/www/awstats-icon
/usr/lib/cgi-bin/awstats.pl -config=hostname -update


Then access to :http://hostname/cgi-bin/awstats.pl?config=hostname

Edit cron

crontab -e
--
0 1 * * * /usr/lib/cgi-bin/awstats.pl -config=hostname -update

Wednesday, May 14, 2008

Firefox3 Plugins

I've been using Hardy 8.04 which implements Firefox3.0b5.
Still many of FF plug-ins are not supported for FF3. If you want to use it by any means.

1) about:config
2) Choose New>Boolean. Then "checkCompatibility" to "false".
3) Choose New>Boolean. "checkUpdateSecurity" to "false".
4) Restart Firefox and done ;-)