During the day I take pictures from the camera every minute. I would like to make a video from the images. 1 day -> 1 video
I use mencoder to do that at the end of the day like this: mencoder "mf://*.jpg" -mf fps=25:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vbitrate=7000 -vf scale=1024:768 -oac copy -o movie.avi
It works fine, BUT:
The problem is that i need to do it on Raspberry Pi (700MHz ARM) and it takes him about an hour to make the video from 1500 photos taken during the day (it works at about 0.5 fps).
Is there any way how to make the video "continuously" - how to pass each picture to the mencoder right after it is taken - and stop making the video every day at midnight? It would then just take a picture, process it for a 2-3 seconds and wait for another minute to do it again.
Thanks.
This does not provide the answer for mencoder
, but for ffmpeg
as allowed in the comments.
Requirements:
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'
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:
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.