How to use vlc to record a timelapse video for fun.

VLC can be used to record a timelapse video with a USB webcam. I have just done this and it worked a treat when I tried this. Connect your webcam to your computer and run this command to begin recording.

cvlc v4l2:// :v4l2-dev="/dev/video0" --video-filter=scene --vout=dummy --aout=dummy\
 --intf=dummy --scene-format=jpg --scene-ratio=400 --scene-prefix=snap \
--scene-path=/home/homer/Videos/shots v4l2:// vlc://quit

I am using the /home/homer/Videos/shots directory to hold the screenshots. Once I have recorded enough footage, I need to build a list of all the files.

homer@deep-thought ~/Videos/Webcam $ ls -Ltr > files.txt

Now I create a video file using the files listing.

homer@deep-thought ~/Videos/Webcam $ mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o test.avi -mf type=jpeg:fps=15 mf://@files.txt

My completed video file.

That is how easy it is!

2 responses to “How to use vlc to record a timelapse video for fun.

Leave a Reply