Videoconverterscript
Version vom 27. August 2006, 22:45 Uhr von TomcatMJ (Diskussion | Beiträge) (Videoconcerterscript wurde nach Videoconverterscript verschoben: Tippfehler im Seitennamen :-))
Hier ein kleines Script zum automatischen konvertieren bekannter Videoformate in DVD, VCD, SVCD und PSP konforme Mpeg-Dateien: Vorraussetzung: ffmpeg und mencoder(im mplayer Paket enthalten) müssen instaliert sein, für die Ausgangsdaten eventuell weitere benötigte Codecs sollten ebenso installiert sein.
converterscript.sh
#!/bin/sh
# Conversionscript for converting Videofiles to Widescreen+Fullscreen
# PAL+NTSC DVD, PAL+NTSC VCD+ SVCD, PSP Fileformat with Help of mencoder and ffmpeg
# V. 0.0.1 (c) by Tom Meierjürgen tomcatmj@mehlbox-system.de
# Licence: Creative Commons - attribution - non-commercial - sharealike
export BASE=~/converted
export PSP=$BASE/PSP
export FULLDVD=$BASE/DVD/FULLSCREEN
export WIDEDVD=$BASE/DVD/WIDESCREEN
export VCD=$BASE/VCD
export SVCD=$BASE/SVCD
#PSP-Filmconversion
konsole --noclose --caption "PSP-Film Converting..." -e ffmpeg -i $1 -f psp -r 14.985 -s 320x240 -b 768 -ar 24000 -ab 32 $PSP/$1.MP4 &
konsole --noclose --caption "PSP-Thumb Converting..." -e ffmpeg -y -i $1 -f ljpeg -ss 5 -vframes 1 -s 160x120 -an $PSP/$1.THM &
#mencoder PAL Widescreen DVD Conversion
konsole --noclose --caption "MENCODER PAL Widescreen DVD Converting..." -e time mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 -o $WIDEDVD/mencoder/PAL/$1.mpg $1 &
#mencoder PAL Fullscreen DVD Conversion
konsole --noclose --caption "MENCODER PAL Fullscreen DVD Converting..." -e time mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=352:576,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:acodec=ac3:abitrate=192:aspect=4/3 -ofps 25 -o $FULLDVD/mencoder/PAL/$1.mpg $1 &
#mencoder PAL XVCD Conversion
konsole --noclose --caption "MENCODER PAL XVCD Converting..." -e time mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 -o $VCD/mencoder/PAL/$1.mpg $1 &
#mencoder NTSC Widescreen DVD Conversion
konsole --noclose --caption "MENCODER NTSC Widescreen DVD Converting..." -e time mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=18:acodec=ac3:abitrate=192:aspect=16/9 -ofps 30000/1001 -o $WIDEDVD/mencoder/NTSC/$1.mpg $1 &
#mencoder NTSC Fullscreen DVD Conversion
konsole --noclose --caption "MENCODER NTSC Fullscreen DVD Converting..." -e time mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=352:480,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=18:acodec=ac3:abitrate=192:aspect=4/3 -ofps 30000/1001 -o $FULLDVD/mencoder/NTSC/$1.mpg $1 &
#mencoder NTSC XVCD Conversion
konsole --noclose --caption "MENCODER NTSC XVCD Converting..." -e time mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf scale=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 30000/1001 -o $VCD/mencoder/NTSC/$1.mpg $1 &
#ffmpeg PAL Widescreen DVD Conversion
konsole --noclose --caption "FFMPEG PAL Widescreen DVD Converting..." -e time ffmpeg -i $1 -target pal-dvd -aspect 16:9 $WIDEDVD/ffmpeg/PAL/$1.mpg &
#ffmpeg PAL Fullscreen DVD Conversion
konsole --noclose --caption "FFMPEG PAL Fullscreen DVD Converting..." -e time ffmpeg -i $1 -target pal-dvd -aspect 4:3 $FULLDVD/ffmpeg/PAL/$1.mpg &
#ffmpeg PAL SVCD Conversion
konsole --noclose --caption "FFMPEG PAL SVCD Converting..." -e time ffmpeg -i $1 -target pal-svcd $SVCD/ffmpeg/PAL/$1.mpg &
#ffmpeg PAL VCD Conversion
konsole --noclose --caption "FFMPEG PAL VCD Converting..." -e time ffmpeg -i $1 -target pal-vcd $VCD/ffmpeg/PAL/$1.mpg &
#ffmpeg NTSC Widescreen DVD Conversion
konsole --noclose --caption "FFMPEG NTSC Widescreen DVD Converting..." -e time ffmpeg -i $1 -target ntsc-dvd -aspect 16:9 $WIDEDVD/ffmpeg/NTSC/$1.mpg &
#ffmpeg NTSC Fullscreen DVD Conversion
konsole --noclose --caption "FFMPEG NTSC Fullscreen DVD Converting..." -e time ffmpeg -i $1 -target ntsc-dvd -aspect 4:3 $FULLDVD/ffmpeg/NTSC/$1.mpg &
#ffmpeg NTSC SVCD Conversion
konsole --noclose --caption "FFMPEG NTSC SVCD Converting..." -e time ffmpeg -i $1 -target ntsc-svcd $SVCD/ffmpeg/NTSC/$1.mpg &
#ffmpeg NTSC VCD Conversion
konsole --noclose --caption "FFMPEG NTSC VCD Converting..." -e time ffmpeg -i $1 -target ntsc-vcd $VCD/ffmpeg/NTSC/$1.mpg &
--TomcatMJ 00:41, 28. Aug 2006 (CEST)