incron+ shellscript+ffmpegで、特定フォルダに入った動画ファイルをフレー | Visualize the Invisible

Visualize the Invisible

データとAIを使って、混沌とした世界を「見える化」したい。

参考

ffmpegで動画から画像を切り出す

1. ffmpegで分割

**@instance-1:/home/**/ffmpeg_test$ ffmpeg -i ../test.mp4 -f image2 ./div/%d.jpg

うまくいった。

2.shellscriptで1のコマンドを実行(test.sh)

これも問題無し。

3. incronで、特定フォルダに新しくファイルが置かれたら2を実行

/home/**/ffmpeg_test/test.mp4 IN_CREATE,IN_NO_LOOP sh /home/**/ffmpeg_test/test.sh

うまく動かず。
もうちょいだな。