Videoconverterscript/GP2X

Aus Linupedia.org
Wechseln zu: Navigation, Suche

Dies ist die GP2X-Only Version des Videoconverterscript zur Konvertierung von Videodateien in das Format der GP2X Handheld-Spielekonsole, die auf Linux basiert und XviD oder OGG-Theora Dateien abspielen kann.

Benötigt werden mencoder, ffmpeg, ffmpeg2theora sowie die Codecs, die normalerweise auch zum Abspielen des jeweiligen Videomaterials benötigt würden (nur sofern dazu überhaupt Zusatzcodecs nötig sind, abhängig vom jeweiligen Videomaterial).

converterscript-0.2.pre-c-gp2x-only.sh

#!/bin/sh
# Conversionscript for converting Videofiles to GP2X  Fileformat with Help of mencoder, ffmpeg and ffmpeg2theora
# V. 0.0.2
#
# (c) by Tom Meierjürgen tomcatmj@web.de
# Licence: Creative Commons - attribution - non-commercial - sharealike
#
# Basic settings
#
#
# Mediatype ALL, XVID-GP2X or OGM-GP2X
#
export MEDIA=ALL
#
# TV-Standards
# Choose PAL, NTSC or ALL
export STANDARD=ALL

# Targetdirectories, change values to your needs
export BASE=~/converted
export GP2X=$BASE/GP2X
export DIVXGP2X=$GP2X/DivX
export XVIDGP2X=$GP2X/XviD
export OGMGP2X=$GP2X/OGM
export FILE=$1

test -d $BASE || { mkdir -p $BASE ; }

#
# GP2X XviD PAL
#

if  ( ( [ $MEDIA="ALL" ] || [ $MEDIA="XVID-GP2X" ] ) &&  ( [ $STANDARD="ALL" ] || [ $STANDARD="PAL" ] ) )
 then test -d $XVIDGP2X/PAL || mkdir -p $XVIDGP2X/PAL ; echo "GP2X XviD PAL conversion started..."\n && time konsole --caption "Converterscript v.0.0.2 - Converting XviD PAL for GP2X Console..." -e ffmpeg -i $FILE -vcodec xvid -r 25 -s 720x576 -b 2500K -ar 48000 -ac 2 -ab 384 $XVIDGP2X/PAL/$(basename $FILE).avi ;
 # && echo "Creating Thumbnailgraphics..."\n && time konsole --noclose --caption "Converterscript v.0.0.2 - GP2X-Thumb Converting..." -e ffmpeg -y -i $FILE -f jpegls -ss 5 -vframes 1 -s 160x120 -an $XVIDGP2X/PAL/$(basename $FILE).THM &&
 echo "GP2X XviD PAL Conversion finished."\n;
else echo "GP2X XviD PAL Conversion not selected."\n
fi

#
# GP2X Ogg-Theora PAL
#

if  ( ( [ $MEDIA="ALL" ] || [ $MEDIA="OGM-GP2X" ] )  &&  ( [ $STANDARD="ALL" ] || [ $STANDARD="PAL" ] ) )
 then test -d $OGMGP2X/PAL || mkdir -p $OGMGP2X/PAL ; echo "GP2X Ogg-Theora PAL conversion started..."\n && time konsole --caption "Converterscript v.0.0.2 - Converting Ogg-Theora PAL for GP2X Console..." -e ffmpeg2theora   -x 720 -y 576 -V 2500  -H 48000 -A 384 -c 2 -F 25 -o  $OGMGP2X/PAL/$(basename $FILE).ogm $FILE ;
 # && echo "Creating Thumbnailgraphics..."\n && time konsole --noclose --caption "Converterscript v.0.0.2 - GP2X-Thumb Converting..." -e ffmpeg -y -i $FILE -f jpegls -ss 5 -vframes 1 -s 160x120 -an $OGMGP2X/PAL/$(basename $FILE).THM &&
 echo "GP2X Ogg-Theora Conversion finished."\n;
else echo "GP2X Ogg-Theora PAL Conversion not selected."\n
fi

#
# GP2X XviD NTSC
#

if ( ( [ $MEDIA="ALL" ] || [ $MEDIA="XVID-GP2X" ] ) &&  ( [ $STANDARD="ALL" ] || [ $STANDARD="NTSC" ] ) )
 then test -d $XVIDGP2X/NTSC || mkdir -p $XVIDGP2X/NTSC ; echo "GP2X XviD NTSC conversion started..."\n && time konsole --caption "Converterscript v.0.0.2 - Converting XviD NTSC for GP2X Console..." -e ffmpeg -i $FILE -vcodec xvid -r 30 -s 720x480 -b 2500K -ar 48000 -ac 2 -ab 384 $XVIDGP2X/NTSC/$(basename $FILE).avi ;
 # && echo "Creating Thumbnailgraphics..."\n && time konsole --noclose --caption "Converterscript v.0.0.2 - GP2X-Thumb Converting..." -e ffmpeg -y -i $FILE -f jpegls -ss 5 -vframes 1 -s 160x120 -an $XVIDGP2X/NTSC/$(basename $FILE).THM &&
 echo "GP2X XviD Conversion finished."\n;
else echo "GP2X XviD NTSC Conversion not selected."\n
fi

#
# GP2X Ogg-Theora NTSC
#

if  ( ( [ $MEDIA="ALL" ] || [ $MEDIA="OGM-GP2X" ] )  &&  ( [ $STANDARD="ALL" ] || [ $STANDARD="NTSC" ] ) )
 then test -d $OGMGP2X/NTSC || mkdir -p $OGMGP2X/NTSC ; echo "GP2X Ogg-Theora NTSC conversion started..."\n && time konsole --caption "Converterscript v.0.0.2 - Converting Ogg-Theora NTSC for GP2X Console..." -e ffmpeg2theora   -x 720 -y 480 -V 2500  -H 48000 -A 384 -c 2 -F 30 -o  $OGMGP2X/NTSC/$(basename $FILE).ogm $FILE ;
 # && echo "Creating Thumbnailgraphics..."\n && time konsole --noclose --caption "Converterscript v.0.0.2 - GP2X-Thumb Converting..." -e ffmpeg -y -i $FILE -f jpegls -ss 5 -vframes 1 -s 160x120 -an $OGMGP2X/NTSC/$(basename $FILE).THM &&
 echo "GP2X Ogg-Theora Conversion finished."\n;
else echo "GP2X Ogg-Theora NTSC Conversion not selected."\n
fi

echo "Conversions finished."\n

Zurück zur Multimediaübersicht
Zurück zur Shellscripteübersicht
Zurück zu "Videokonvertierung und DVD oder SVCD erstellen"