Azure Functions のテンプレートに Batch があったので、どのような仕組みになっているか調べている間に面白そうだったので、ImageMagick を使ってみることにしました。 とりあえず Batch のテンプレートを選んで、新しい Function を作成します。今回は Blob にアップロードした mp4 を変換したいので、BlobTrigger を選びます。 BlobTrigger を選ぶとストレージアカウントの設定と監視するパスの入力が必要ですが、めんどくさかったのでほぼデフォルトのままにしました。 ImageMagick の Portable 版をダウンロードすると ffmpeg が入っているので、これをそのまま利用します。必要な ffmpeg と convert は Kudu を使って直接アップロードしました。 準備が整ったので Function の中身を書いて