您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112
  1. #!/usr/bin/env bash
  2. # AUTHOR: shaggy
  3. # FILE: oggtomp3
  4. # ROLE: TODO (some explanation)
  5. # CREATED: 2014-12-25 17:06:54
  6. # MODIFIED: 2014-12-25 17:07:40
  7. for f in *.ogg; do
  8. title=$(vorbiscomment -l "$f" | grep -i 'title' | cut -d '=' -f 2)
  9. album=$(vorbiscomment -l "$f" | grep -i 'album' | cut -d '=' -f 2)
  10. artist=$(vorbiscomment -l "$f" | grep -i 'artist' | cut -d '=' -f 2)
  11. ffmpeg -y -i "$f" -metadata title="$title" -metadata album="$album" -metadata artist="$artist" -ab 256k "${f%.ogg}.mp3"
  12. done