Benutzer-Werkzeuge

Webseiten-Werkzeuge


ogg

zypper ar http://packman.inode.at/suse/11.2/Packman.repo

zypper in mpg321... mp3info... ffmpeg
mpg321 input.mp3 -w - | oggenc -o output.ogg -
for i in *.mp3; do mpg321 $i -w - | oggenc -o `echo $i | cut -d "." -f 1`.ogg -; done
  • Skript um mp3 Dateien in einerm Verzeichnis in ogg umzuwandeln, inkl. aller ID3 Tags
    • mp32ogg.sh:
#!/bin/bash
 
# mpg321, oggenc, mp3info werden benoetigt.
# Suche auf https://build.opensuse.org/package
 
for i in *.mp3
 do
  filespec=`echo $i | cut -d "." -f 1`
  title=`mp3info -p %t $i`
  track=`mp3info -p %n $i`
  album=`mp3info -p %l $i`
  artist=`mp3info -p %a $i`
  genre=`mp3info -p %g $i`
 
  echo "##################"
  echo $filespec
  echo $title
  echo $track
  echo $album
  echo $artist
  echo $genre
  echo "##################"
 
  mpg321 $i -w - | oggenc -N "$track" -t "$title" -l "$album" -a "$artist" -G "$genre" -o $filespec.ogg -
 done

  • ogg2mp3:
#!/bin/sh
# ------------------------------------
# ogg to mp3 converter script
# Author: Oliver "BaronThoran" Erdmenger
#
# Requirements:
# - ogg123 (the command!)
# - lame
# ------------------------------------
# step1: ogg to wav
#
find  -type f -name "*.[Oo][Gg][Gg]" -printf '%P\n' | while read i
do
        out=`echo $i | sed -e "s/.[Oo][Gg][Gg]$//"`
        ogg123 -d wav -f "$out.wav" "$i"
done
#
# step2: wav to mp3
#
find  -type f -name "*.[Ww][Aa][Vv]" -printf '%P\n' | while read i
do
        out=`echo $i | sed -e "s/.[Ww][Aa][Vv]$//"`
        lame -v -h -b 192 "$i" "$out.mp3"
done
rm *.wav
echo "Conversion done! :)"
#
# end

  • wav2ogg.sh (Skript für CD-ROM Server)
#!/bin/bash
 
cd /nfs/cdrom/englisch
for folder in *
do
cd $folder
 
###### MAIN ###########
# Track entfernen
for i in *.wav
do
 NEWNAME=`echo $i | cut -d " " -f 2`
 mv "$i" "$NEWNAME"
done
 
# Zweistellig 
   width=2
    for file in *.wav;
    do
        fullname=${file/%.wav};
        basename=${fullname%%[0-9]*};
        index=${fullname/#$basename};
        z="00000000"$index;
        if [[ ${#index} < $width ]]; then
            index=${z:$((${#z} - $width))};
        fi;
        mv -v ${file} ${basename}${index}.wav
    done
 
# Umwandeln in ogg
for i in *.wav
do
 out=`echo $i | sed -e "s/.[Ww][Aa][Vv]$//"`
 ordner=`pwd | cut -d "/" -f 5`
 artist=`echo $ordner | cut -d "-" -f 1`
 album=`echo $ordner | cut -d "-" -f 2`
 track=`echo $out | cut -d "k" -f 2`
 
 lame -v -h -b 192 "$i" "$out.mp3"
 mpg321 "$out.mp3" -w - | oggenc -N "$track" -a "$artist" -l "$album" -t "$out" -o "$out.ogg" -
done
 
# Aufraeumen
rm *.mp3 *.wav
#########################
cd ..
 
done
ogg.txt · Zuletzt geändert: 2010/09/14 18:24 (Externe Bearbeitung)