#!/bin/bash # # 5800_convert # Converts almost any video to be played back on the Nokia 5800XM # needs mencoder (provided with mplayer) and libnotify for notifications # # Copyright (C) 2009 Dominik Seemann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # PCOUNT=$# for ((i = 1; i <= $PCOUNT ; ++i)) do xterm -e mencoder -of lavf -lavfopts format=mp4 -oac lavc -ovc lavc -lavcopts aglobal=1:vglobal=1:acodec=libfaac:abitrate=128:vcodec=mpeg4:keyint=25 -af lavcresample=44100 -vf harddup,scale=640:360 -mc 0 -noskip "$1" -o "$1_5800.mp4" notify-send "File $i converted" shift done notify-send "All jobs done."