These methods work in Fatdog 702 (ffmpeg 2.1.3) or in Tahr + ffmpeg from the repo, using either the netbook built-in webcam or usb webcam.
"By using a relatively simple filter chain, FFmpeg can generate timelapse video in one step." https://tekwiki.beylix.co.uk/index.php/ ... ith_FFmpeg
Code: Select all
V="select=not(mod(n\,60)),setpts=N/(30*TB),fps=30"
ffmpeg -i /dev/video0 -vf $V output.mov
Another edit This method is much simpler and appears to be more reliable on a slow computer. The -t value gives the real time and the filter the time-lapse factor. Example: a 15 second video covering 60 seconds of real time
Code: Select all
ffmpeg -t 60 -i /dev/video0 -filter:v "setpts=0.25*PTS" file.mp4
Code: Select all
V="settb=1/30,setpts=N/TB/30"
ffplay /dev/video1 &
ffmpeg -framerate 2 -f x11grab -s 640,480 -show_region 1 -i :0+0,40 -vf $V -r 30 out.mov
Combine jpegs (e.g. http://lukemiller.org/index.php/2014/10 ... pse-notes/) This works well and it's easy to change the time between frames. The images can be monitored as acquired. maag or ffmpeg itself can be use to make an animated gif. A large number of jpeg files must be stored temporarily.
Code: Select all
cd /tmp
rm -f image*
for i in {0..120} ; do
file="image"$(echo "000$i" | tail -c 5)".jpg" # file name format image%04d.jpg
ffmpeg -f v4l2 -an -i /dev/video1 -frames:v 1 -f image2 $file
sleep 5
done
ffmpeg -i image%04d.jpg MOVIE.mov
Code: Select all
cd /tmp
echo -e "file 'MOVIE.mov\nfile 'M1.mov'" > mylist.txt #instructions for concat command
ffmpeg -f v4l2 -an -i /dev/video1 -frames:v 1 -y MOVIE.mov # first frame
for T in {0..120} ; do
sleep 5
ffmpeg -f v4l2 -an -i /dev/video1 -frames:v 1 -y M1.mov # new single frame
ffmpeg -f concat -i /tmp/mylist.txt -y -c copy temp.mov # transfer file
mv -f temp.mov MOVIE.mov
done