Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # 20170413 Roey Katz - throwaway script to convert .webm files to .mp3
- # these .webm files I got after downloading music tracks from Youtube with
- # the command:
- #
- # youtube-dl --verbose -x --audio-format mp3 -o "$TRACKNAME".mp3 "$URL"
- #
- # Turns out the file written was in .webm format... so I'm fixing that
- # in the New Israeli Music 3 pt. 4 directory. It has .mp3s in it as
- # well as subfolders with more .mp3s.
- # for all .mp3s in this directory or first-level subdirectories...
- for n in *.mp3 */*.mp3; do
- # test to see if the mp3 file is actually a webm file
- file "$n" | grep -i WebM;
- # if it was, a .webm after all, convert it to mp3
- if [ $# -eq 0 ];
- then echo "converting: $n";
- # else, just leave it alone
- else echo "no";
- # done with if block
- fi;
- # done
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement