Konqueror create video action

 ( selli | 2007. május 23., szerda - 15:20 )

Elkovettem egy olyan konqueror action-t ami egy folderba levo kepekbol letrehoz egy video-t, gondolom megosztom hatva valakinek jol jon:

mencoder.desktop: ( $HOME/.kde/share/apps/konqueror/servicemenus -be )

[Desktop Entry]
ServiceTypes=image/jpeg,image/png,image/x-targa
Actions=createVideo

[Desktop Action createVideo]
Name=Create video
Icon=video
Exec=konsole --noclose -e createVideo.sh %u

createVideo.sh: ( valahova a $PATH-ba )

#!/bin/bash

if [ -z "$1" ]; then
URL=$(pwd)/$(ls * | egrep -i "*.jpg|*.png|*.jpeg|*.tga" | head -1)
else
URL=$1
fi

DIR=$(dirname $URL)
FILE=$(basename $URL)
VID=$(echo $FILE | sed 's/[0-9].*//')
EXT=$(echo $FILE | sed 's/.*\.//')

if [ -z $VID ]; then
VID=output
fi

cd $DIR &&
mencoder "mf://*.$EXT" -mf fps=25 -o $VID.avi -ovc lavc -lavcopts vcodec=mpeg4