Anhang: convert2ogg-theora.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | #!/bin/bash ## This script is based on the program "ffmpeg2theora" and converts videofiles to ogg-theora-files. ## For decode and encode you need "ffmpeg2theora". For the graphical dialogues you also need "zenity". ## Dieses Skript basiert auf dem Programm "ffmpeg2theora" und wandelt Videodateien in Ogg-Theora-Dateien um. ## Zum Dekodieren und Kodieren brauchst Du "ffmpeg2theora". Für die grafischen Dialoge benötigst Du "zenity". ## copyright (C) 2009 Til Til ## ## 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 2 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, write to the Free Software ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 ## USA #set -x version="0.1.0" ################################################# # TRADUCTIONS ###### Default = English ##### title="convert2ogg-theora "$version"" quiet=no report() { # if [ "$quiet" = "no" ] # then # if [ "$1" = "-n" ] # then # shift # echo -n $* # else # echo $* # fi # fi if [ "$quiet" = "no" ] then if [ "$2" = "-n" ] then shift echo -n $* else echo $* fi fi } if [ "$#" = 0 ] then fs=`find . -name "*.*"` else if [ "$1" = "-q" ] then shift quiet=yes fi fs=$* fi f=$f f=$fs if find -samefile ${f%%.*}_2.ogv then zenity --error --title="$title" --text=" error - ${f%%.*}_2.ogv already exists, don't want to overwrite, conversion was stoped." | report -n " error - ${f%%.*}_2.ogv already exists, don't want to overwrite, conversion was stoped." exit fi #for f in $fs ; #do report -n " $f: convert to ${f%%.*}_2.ogv" ## You want to get ogg-theora? You need "ffmpeg2theora". ## Du möchtest Ogg-Theora? Du benötigst "ffmpeg2theora". ## With -v you can configure the video-encoding-quality between 0 and 10. Standard is 5. ## With -V you can configure the video-bitrate between 1 and 16778 in kbps. Standard is 1200 kbps. ## With -a you can configure the audio-encoding-quality between -2 and 10. Standard is 1. ## With -A you can configure the audio-bitrate between 32 and 500 in kbps. Standard is 112 kbps. ## More options in the terminal with "man ffmpeg2theora" ffmpeg2theora -o ${f%%.*}_2.ogv -V 1200 -A 112 $f | zenity --progress --title="$title" --text=" $f: convert to ${f%%.*}_2.ogv" --auto-close --auto-kill if find -samefile ${f%%.*}_2.ogv then zenity --info --title="$f $title" --text=" conversion to ${f%%.*}_2.ogv finished" --timeout 3 | report " conversion to ${f%%.*}_2.ogv finished" else zenity --error --title="$title" --text=" error - $f not converted" | report " error - $f not converted" fi #done exit |
Skript für die einfache Benutzung im Dateimanager Nautilus mit Hilfe von nautilus-script-audio-convert zum Umwandeln von Videodateien verschiedener Formate mit einem Mausklick in Ogg-Theora-Dateien.