mencoder to concat all captured jpgs

A place for discussion of topics that are not specific to ZoneMinder. This could include Linux, Video4Linux, CCTV cameras or any other topic.
Post Reply
ralf.butler
Posts: 11
Joined: Mon Jun 15, 2009 2:12 am

mencoder to concat all captured jpgs

Post by ralf.butler »

Dear All,

I need to generate a video out of the captured jpg images which zomeminder generates in the /var/cache/zoneminder/events/... sub-directories. For me the easiest way to do this in an automatic way, is to set up a cron job which generates one video every day and than deletes all jpgs which have been merged into the daily video.
I decided to use the mencoder to merge all jpg images into a video. The command I use so far is:

Code: Select all

mencoder mf://*.jpg -mf w=320:h=240:fps=25:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi
The generation happens very fast and is much better than 'convert *.jpg output.mg' for example. However, I have the problem when playing the generated avi-video with VLC, the video runs much too fast. I tried to reduce the fps already, but that doesn't help that much.
Perhaps some backgrounds to the used hardware: I'm using the PV-143 - 4 port video capture card (http://store.bluecherry.net/Provideo_PV ... -143na.htm). To my understanding, it means that 7.5 frames per second are captured per input. However, when I check a camera in zoneminder I see an alarm status: Alarm - 2.11 fps. Hmm ... not good :( Anyway, I read that this is normal for a one chip capture card. And it is not such a big problem.

But I need to know how to configure mencoder in such a way that the video isn't played too fast or too slow.

Thank you,
Ralf
ralf.butler
Posts: 11
Joined: Mon Jun 15, 2009 2:12 am

Post by ralf.butler »

Ok, if captured with 40fps, all works fine. Will buy a capture card with 4 chips.

Ralf
Post Reply