動画変換メモ2

Mac OS X上で手持ちの動画を702NK用の動画ファイル(.3gp)に簡便に変換するDroplet。

on open selectItem
    set MyPath to path to me
    tell application "Finder" to set MyPath to (container of MyPath) as Unicode text
    repeat with eachItem in selectItem
        set mvName to name of (info for eachItem)
        set savedDelim to AppleScript's text item delimiters
        set AppleScript's text item delimiters to "."
        set mvName to text items 1 thru -2 of mvName
        set mvName to mvName as text
        set AppleScript's text item delimiters to savedDelim
        tell application "Finder"
            set mvPath to (container of eachItem) as Unicode text
        end tell
        do shell script quoted form of (POSIX path of (MyPath & "ffmpeg")) & " -y -i " & quoted form of (POSIX path of eachItem) & " -bitexact -vcodec mpeg4 -fixaspect -s 176x144 -r 14.985 -b 100 -acodec aac -ac 2 -ar 16000 -ab 32 -f 3gp -muxvb 64 -muxab 32 " & quoted form of (POSIX path of (mvPath & mvName & ".3gp"))
    end repeat
end open
  1. スクリプトエディタを開き上のスクリプトをコピペ。
  2. 適当な名前でアプリケーションとして保存。
  3. おもむろにiPSP*1をダウンロード。
  4. iPSPアプリケーションをcontrol+クリックし「パッケージの内容を表示」。
  5. Contents/Resourcesを開き、ffmpeg*2 *3をデスクトップにコピー(option+ドラッグ)。
  6. デスクトップのffmpegを先に保存したスクリプトと同じフォルダに置く。
  7. 変換したい動画ファイルをスクリプトにドラッグ&ドロップ。
  8. スクリプトのアイコンがDockから消えるまでしばらく待つ。

‥‥‥うまく変換できるファイルもあり、そうでないファイルもあり‥‥‥。