Playing with Videos, Images and Fire

less than 1 minute read

Interacting with Video

I used FFMPEG to process with videos. While there is pyffmpeg library as a python wrapper API but it appears to be broken at the moment and currently in development. Therefore I used subprocess to execute ffmpeg command directly on bash.

In order to create an image from a particular frame you can use:

ffmpeg -i input.flv -ss 00:00:14.435 -vframes 1 out.png However, this will be a seek operation with means that it might take some time, depending upon the length of the video and the frame.

To create one picture per second you can use the following command ffmpeg -i input.flv -ss 00:00:14.435 -vframes 1 out.png

References

  • https://trac.ffmpeg.org/wiki/Create%20a%20thumbnail%20image%20every%20X%20seconds%20of%20the%20video