multimedia:mp3:convertaac
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| multimedia:mp3:convertaac [2015/05/09 10:30] – angelegt rsi | multimedia:mp3:convertaac [2015/05/09 11:27] (aktuell) – rsi | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| == aac in mp3 konvertieren == | == aac in mp3 konvertieren == | ||
| + | === aac_to_mp3.sh === | ||
| < | < | ||
| #!/bin/bash | #!/bin/bash | ||
| # | # | ||
| - | # Shell script for m4a to mp3 conversion | + | # Shell script for aac to mp3 conversion |
| # | # | ||
| - | # The scripts reads all m4a files recursively from a directory tree | + | # The scripts reads all aac files recursively from a directory tree |
| - | # It creates the mp3 file from the m4a, and removes the m4a file | + | # It creates the mp3 file from the aac, and removes the aac file |
| # | # | ||
| # Please run the script from the Base Directory in which your Music is stored | # Please run the script from the Base Directory in which your Music is stored | ||
| Zeile 14: | Zeile 14: | ||
| # ------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------ | ||
| - | # function to list all m4a files into a file | + | # function to list all aac files into a file |
| # ------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------ | ||
| list_songs(){ | list_songs(){ | ||
| - | echo " | + | echo " |
| sleep 2 | sleep 2 | ||
| - | find . -type f -name *.m4a > $FILE | + | find . -type f -name \*.aac > $FILE |
| echo "added `wc -l $FILE` entries" | echo "added `wc -l $FILE` entries" | ||
| echo " | echo " | ||
| Zeile 29: | Zeile 29: | ||
| # ------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------ | ||
| - | # function to convert a single file from m4a to mp3 | + | # function to convert a single file from aac to mp3 |
| # ------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------ | ||
| - | m4a_to_mp3(){ | + | aac_to_mp3(){ |
| - | | + | |
| - | echo " | + | echo " |
| - | # convert | + | # convert |
| - | faad "$m4a_file" | + | faad "$aac_file" |
| # generating filenames | # generating filenames | ||
| - | wav_file=`echo "$m4a_file"|sed -e 's/.m4a/ | + | wav_file=`echo "$aac_file"|sed -e 's/.aac/ |
| - | mp3_file=`echo "$m4a_file"|sed -e 's/.m4a/ | + | mp3_file=`echo "$aac_file"|sed -e 's/.aac/ |
| #echo "wav file: $wav_file" | #echo "wav file: $wav_file" | ||
| Zeile 48: | Zeile 48: | ||
| # preserve track info, lame will use it for id3 tagging | # preserve track info, lame will use it for id3 tagging | ||
| - | faad -i "$m4a_file" 2> | + | faad -i "$aac_file" 2> |
| title=`grep ' | title=`grep ' | ||
| artist=`grep ' | artist=`grep ' | ||
| Zeile 65: | Zeile 65: | ||
| rm " | rm " | ||
| #echo " | #echo " | ||
| - | rm "$m4a_file" | + | rm "$aac_file" |
| - | #echo " | + | #echo " |
| } | } | ||
| Zeile 75: | Zeile 75: | ||
| FILE=" | FILE=" | ||
| - | # create list of m4a Files (> songlist.txt) | + | # create list of aac Files (> songlist.txt) |
| list_songs | list_songs | ||
| | | ||
| Zeile 93: | Zeile 93: | ||
| while read line | while read line | ||
| do | do | ||
| - | m4a_to_mp3 | + | aac_to_mp3 |
| done | done | ||
| exec 0<&3 | exec 0<&3 | ||
multimedia/mp3/convertaac.1431160233.txt.gz · Zuletzt geändert: von rsi
