この記事は 慶應義塾大学SFC村井&徳田研 Advent Calendar 2015 の3日目の記事です。 ミュージックビデオを作るとき、大事なのは映像と音楽の同期です。動きとテンポがシンクロしていると、それだけでかっちょいいムービーになります。 しかし、意外にも動画編集ソフトのAdobe Premiereは、自動BPM検出どころか一定間隔でマーカーを打つ機能すらありません。仮にBPM160で5分の動画だと、手動で800個のマーカーを打つ地獄になります。それは嫌です。 Adobe ExtendScript Adobe製品のGUIをJavaScript(ES5?)から操作できる「ExtendScript」というものがあります。公式のドキュメントがほぼ皆無なので知名度も低いですが、今回のような単純作業には非常に有用です。 マーカーを扱うためのAPI MarkerCollectionオブジェクト