手順
- 音声なしの静止画だけの動画(empty.avi)を作る
- 音源ファイルと empty.avi をくっつけて out.avi を作成
- empty.avi を削除
ffmpeg -f image2 -r 1 -loop_input -t 【音源ファイル再生時間】 -i 【画像ファイル】 empty.avi
ffmpeg -i empty.avi -i 【音源ファイル】 out.avi
rm empty.avi
実行例
ffmpeg -f image2 -r 1 -loop_input -t 00:04:35 -i img.png empty.avi
ffmpeg -i empty.avi -i sound.mp3 out.avi
rm empty.avi
【音源ファイル再生時間】は実際の再生時間+1秒しとくと尻切れがなくて吉。