For one of my tests I needed to convert my video into individual images. And once again FFMpeg was to my rescue.
ffmpeg -i mytest.flv -f image2 images%04d.jpg
The above command would convert the flv file into images and store the same as image0001.jpg, image0002.jpg … so on in the current directory. we can also specify a separate directory into which the images need to be outputted.
ffmpeg -i mytest.flv -r 1 -f image2 extract/image%04d.jpg
The above command extracts an image per second of audio and stores it in a sub-directory called extract.
Likewise, if we need to convert a sequence of images into a video, the following command would do the rest
ffmpeg -f image2 -i image%03d.jpg myvideo.flv
We can also specify the frame rate using the -r switch in the above command