epgrec(epgrec-090814.tar.gz(2009年8月14日版))にて、いつからか録画済み番組のサムネイル画像が作られなくなっていた*1。インストールされているffmpegのバージョンはgit-2013-06-16-3b86174で、標準リポジトリのffmpegと何かの理由で差し替えたものと思われ(るが忘れた)、これによりffmpegのオプションの順番が変わったことが原因の模様。
gen-thumbnail.shを以下のように変更する。
(変更前)
${FFMPEG} -i ${OUTPUT} -r 1 -s 160x90 -ss ${offset} -vframes 1 -f image2 ${THUMB}
(変更後)
${FFMPEG} -r 1 -ss ${offset} -i ${OUTPUT} -s 160x90 -vframes 1 -f image2 ${THUMB}
サムネイルの再作成
epgrecディレクトリで以下のコマンドを実行する。video/はvideoディレクトリの名前に変更すること。
for i in `find video/ -type f | grep -e '\.mp4$'`; do [ -f thumbs/`basename $i`.jpg ] || ffmpeg -r 1 -ss 30 -i $i -s 160x90 -vframes 1 -f image2 thumbs/`basename $i`.jpg; done
参照サイト
簡素なif文の書き方
ffmpegで以下のエラーが出る件について、-vframesのコマンドの順番の問題と触れられている。
Option vframes (set the number of video frames to record) cannot be applied to input file - -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
*1:最後に作られていたサムネイル画像のタイムスタンプは2014/9/19となっていた