Friday 22 October 2010

Split video file using ffmpeg and mencoder

Example:

ffmpeg -i input.flv -ss hh:mm:ss -t hh:mm:ss output.flv

Where:

-ss :  Buration
-t : Start time
hh: hours
mm: minutes
ss: seconds

If this does not work try mencoder:

 mencoder -ss 00:00:00 -endpos 00:35:20 -oac pcm  -ovc copy input.mp4 -o output.mp4

Wednesday 20 October 2010

script to set drupal permissions

#! /bin/bash
cd /var/www/drupal
chown -R drupmin:www-data .
find . -type d -exec chmod u=rwx,g=rx,o= {} \;
find . -type f -exec chmod u=rw,g=r,o= {} \;

cd sites
find . -type d -name files -exec chmod ug=rwx,o= '{}' \;
find . -name files -type d -exec find '{}' -type f \; | while read FILE; do chm$
find . -name files -type d -exec find '{}' -type d \; | while read DIR; do chmo$


echo "Permission rebuildng is done!"