Created
February 2, 2020 07:46
-
-
Save IkezoeMakoto/3d0a1c0451d3f91467289d04643b7293 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dir_path="." | |
dirs=$(find $dir_path -mindepth 1 -maxdepth 1 -name '*.oma' -print0) | |
for file in $dirs; | |
do | |
targetName=${file#./} | |
encodeName=${targetName%.oma}.mp3 | |
if [ -e "$encodeName" ]; then | |
continue; | |
fi | |
ffmpeg -i "$targetName" -vn -ac 2 -ar 48000 -ab 320k -acodec libmp3lame -f mp3 "$encodeName" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
こちらでデバッグしたところ、そうすると "あいまいなリダイレクト” でエラーが出たため、違う方向性からスクリプトを作成しました。
本当にありがとうございました。
なお自分で改良したスクリプトは、以下の通りです。