Archive for the Category » sysadmin «

Samedi, septembre 27th, 2008 | Author: admin

Useful file copy snippets collection for systems administration. scp is not here : syntax is trivial, and scp is really slow. The snippets below are supposed to be much faster, especially when dealing with many small files.

netcat style

  • On sender :

cd to the top dir to be copied recursively, and :
tar cv . | nc -vq 10 -l -p 1234

  • On receiver :

cd to the dir where the content has to be copied, and :
nc -v sender 1234 | tar xf -

ssh style

  • Data is remote, copy to where I am now :

ssh user@source "cd /source/dir; tar cv ." | tar x

  • Data is in current directory, copy to remote server :

tar cv . | ssh user@destination "cd /dest/dir; tar x"

rsync+ssh style

  • Data is in current directory, copy to remote server :

rsync -ve ssh -ar . user@destination:/dest/dir/

Note : add ‘z’ to tar options if link is slow

Category: sysadmin  | Tags: , , , , , ,  | Leave a Comment
Samedi, septembre 27th, 2008 | Author: admin

Few usefull video snippets.

Grabbing from DV cam, autosplitting scenes :

dvgrab -- autosplit -timestamp –format=dv2 video

Deinterlacing :

ffmpeg -i in-dv.avi -deinterlace -vcodec huffyuv -pix_fmt yuv422p -target pal-dvd out.avi

Flv encoding :

ffmpeg -i input.avi -ar 22050 -ab 64 -aspect 4:3 -b 768k -pass 1 -f flv -s 640x480 -acodec mp3 output.flv
then again with -pass 2.

Another solution :
mencoder out.avi -o out.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames

Category: sysadmin, video  | Tags: , , ,  | Leave a Comment