Posts tonen met het label linux. Alle posts tonen
Posts tonen met het label linux. Alle posts tonen

woensdag 1 juni 2011

encoding video for ipad with ffmpeg

Hi


I have an ipad at work , but encoding video for it using gaphicla tools is a hassle, and often turns out bad. and itunes (on my mac mini) doesn't reencode the videos... so i made a script

now my debian box can do it
(you need to install libfaac .. on my debian box i folowed the instructions here
for ubuntu users .. i know option C from this post works)

the ffmpeg command i use is
ffmpeg -i input.avi -f mp4 -vcodec libxvid -maxrate 1000 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec libfaac -mbd 2 -s 640x480 -ab 128 -b 400 output.mp4


still meaning everthing has to be done one by one .. still cumbersome
so i made a quick and dirty looping script

so the script becomes

#!/bin/bash

#create a folder for the encodes
mkdir $1/encodedforipad/

#encode away
for i in $(ls $1);
do

ffmpeg -i $dir/$i -f mp4 -vcodec libxvid -maxrate 1000 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec libfaac -mbd 2 -s 640x480 -ab 128 -b 400 $1/encodedforipad/$i.mp4
done

make it executable and call it with the first argument being the folder where you host your video files. (attention: the script is not recursive and does not handle spaces in names well).

woensdag 30 maart 2011

checking remote server with nrpe

assuming you know the comamnd you want to use on the remote server.
Usually something like:
//usr/lib/nagios/plugins/check_log-F logfile -O oldlog -q query


on the machine you want to monitor :
edit the /etc/nagios/nrpe.cfg file to include the command you want to execute (there should be a number of examples)

in my example:
command[check_login]=/usr/lib/nagios/plugins/check_log -F /var/log/messages -O /home/nagiosuser/logs/check_log.badlogins.old -q "LOGIN FAILURE"


restart the nrpe daemon:
/etc/init.d/nagios-nrpe-server restart




on the nagios server:
edit your commands.cg file to include the nrpe command

for example
define command{
command_name check_login
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c check_login

}

edit the config file for the remote host you're monitoring to add this command

in my example:
define service{
use generic-service
host_name remotehost
service_description Failed login check
check_command check_login
}

zondag 30 januari 2011

encoding video for my adroid phone (betouch e130)

hi

i've bought a acer betouch e130 a few days ago and all is well so far
have been looking how to encode video for it thou (using ubuntu)
the ffmpeg line is below ..

greetz

WOuter


ffmpeg -y -i input.avi -vcodec h263 -s 176x144 -r 15 -b 700k -acodec libfaac -ac 2 -ar 32000 -ab 64k -f 3gp output.mp4

donderdag 2 oktober 2008

Forwarding mail in debian

if you have a server sitting somewhere it is very useful to have the systems mail forwarded to your normal e-mail address

For this you will of course need to install postfix (or sendmail, but i use postfix)

$ sudo apt-get install postfix

after install open /etc/postfix/main.cf

$nano /ect/postfix/main.cf

and find the line that says relayhost = and fill out a useable relay host
then restart postfix

/etc/init.d/postfix restart

First for your normal users account create a file called " .forward " containing your e-mail adress
Root mial cannot be forwarded to anny user outside the machine. so we have to forward it to your user . (who then forwards it to your external e-mail account)


in the /root folder create a file called .forward containing "your-user-account"@localhost

>so for me this would be "wouter@localhost" (because my username is wouter)

you system mail should now be forwarded to your external e-mail account

woensdag 1 oktober 2008

Getting the nslu2 (with debian) to talk

Hi

I own an nslu2 on wich i run debian, for use as a small home-server and place from where i can ssh to the rest of the network

for those of you that are looking how to do this, please see this page


annyway getting it to produce a sound, anny sound can be quite usefull when running scripts and cronjobs.

First install beep
$ apt-get install beep


on a normal Debian system you would just give it the beep command
$ Beep


but to get your nslu2 to sing you should go
$ beep -e /dev/input/by-path/platform-ixp4xx-beeper*