This does not provide the answer for mencoder
, but for ffmpeg
as allowed in the comments.
Requirements:
- All pictures must be consecutively numbered (i.e. picName1.png, picName2.png, etc.)
- All pictures must be in the same folder.
- You must have the latest version of ffmpeg since the options
recently changed
To create your video use:
ffmpeg -r fps -f image2 -i '/path/to/your/picName%d.png' -qscale 0 '/path/to/your/new/video.avi'
- Replace fps by the desired frame rate (10, 25, 30, etc) fps.
- Replace /path/to/your/picName by the actual path, but leave the
%d which tells ffmpeg to put a number there.
- Replace /path/to/your/new/video.avi by your selected
destination.
The video created this way will be of the highest quality. You can adapt the quality to match your video size requirements using the -q
option.
See the man page for ffmpeg for more explanations.
Unfortunately, to my knowledge, there is no way to pass one picture every few minutes or so. I would suggest one of the solutions below:
- Compile the video once a day, at midnight. You get it at 1 am.
- Compile the video several time a day, if you need to look at it.
That's a lot of wasted processing, since you process the whole lot
each time.
- Compile the video by chunks (every 2 hours for instance) and merge
all videos at the end of the day.
If you don't need to look at the video during the day, then the first solution is the easiest.
Below is a quote from the man page:
For creating a video from many images:
ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi The syntax
"foo-%03d.jpeg" specifies to use a decimal number composed of three
digits padded with zeroes to express the sequence number. It is the
same syntax supported by the C printf function, but only formats
accepting a normal integer are suitable.