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

Posted: June 19, 2014. At: 6:29 PM. This was 4 years ago. Post ID: 7418
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

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!

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

Hi John Great pointer and has helped me set up 2 timelapse cams… I have one problem tho’
I set up a /home/jonnix/Pictures/shots directory and inserted that in your command above:

 $ cvlc v4l2:// :v4l2-dev="/dev/video1" --video-filter=scene --ut=dummy --aout=dummy 
--intf=dummy --scene-format=jpg --scene-ratio=400 --scene-prefix=snap 
--scene-path=/home/jonnix/Pictures/shots v4l2:// vlc://quit

but the images from the video1 cam defaults to being saved in the /Pictures dir. and not /Pictures/shots – I can’t find out why that is?

This is problematic as in the end I want to run the 2 cams to 2 folders, say /shots and /shots1, to then generate 2 films to use on a split screen

I’ve been through vlc looking for how to change the default directory in some other way but tbh I can’t find why/where its set to /home/jonnix/Pictures as the default…. so any advice gratefully received

Try this instead and see how you go.

cvlc v4l2:// :v4l2-dev="/dev/video1" --video-filter=scene --ut=dummy --aout=dummy 
--intf=dummy --scene-format=jpg --scene-ratio=400 --scene-prefix=snap 
--scene-path=/home/jonnix/Pictures/shots/ v4l2:// vlc://quit

yes that did it !! (just added back the ‘vo’ I dropped to ‘….. –ut=dummy –aout=dummy …’) many many thanks John!

Cool, I never thought that VLC could have such useful function. I will try it later. Aside from using VLC, I’d also recommend Acethinker Online Screen Recorder which I have been using for many years. It is a free web-based tool that lets you record your screen right from your browser. You don’t have to install any additional plug-ins or add-ons.

Leave a Reply