----ここからユーザー設定
set OptionAR to " -ar 44100" as Unicode text
set OptionAB to " -ab 256k" as Unicode text
set OptionAQ to " -aq 100" as Unicode text
set OptionAC to "2" as Unicode text
set OptionAN to "" as Unicode text
set OptionACODEC to " -acodec aac" as Unicode text
set OptionNEWAUDIO to " -newaudio" as Unicode text
set OptionALANG to " -alang jpn" as Unicode text
set ComPath to "/usr/local/bin/ffmpeg -y -i " as Unicode text
set FileExet to ".m4a" as Unicode text
----ここまでユーザー設定
set OpenDef to the path to desktop as alias
tell application "Finder"
---ファイルを選んで
set FileAlias to choose file with prompt "ファイルを選んでください" default location (OpenDef)
---選んだファイルをUNIX式のパスに変換する
set OpenFiles to (POSIX path of FileAlias)
---コマンドを整形して
set ComFFmpeg to ComPath & "\"" & OpenFiles & "\"" & " -vn " & OptionAB & OptionAR & " \"" & OpenFiles & FileExet & "\"" & OptionNEWAUDIO & OptionALANG & OptionAR & OptionAB & OptionAQ
---コマンド実行
do shell script ComFFmpeg
end tell