Quantcast
Viewing all articles
Browse latest Browse all 4845

Camera board • rpicam-lapse - Rpicam timelapse video recording application

Ever wanted to generate timelapse video, without generating hundreds or even thousands of images and requiring FFMPEG to stitch these images into video, all running on Raspberry Pi? Well, fret not, as I've finally created a modified version of rpicam-apps to include a new command called "rpicam-lapse".

Here's my forked rpicam-apps repo with the added rpicam-lapse: https://github.com/shouta569/rpicam-apps
And here's the only commit that I've added to my forked repo: https://github.com/shouta569/rpicam-app ... ad155ef81c
Feel free to modify the code as you see fit.

Follow this link guide to build custom rpicam-apps
https://www.raspberrypi.com/documentati ... picam-apps

The supported options used for rpicam-lapse are similar to common and video options, with 2 new options:
  • Interval - Duration between captured still images (Default: 1000ms)
  • Autofocus-on-capture - Run autofocus once before capturing timelapse video (Default: false)
Side note: "no-raw" default value was set to true to avoid unintended image cropping.

Here's an rpicam-lapse example in Raspberry Pi 3B+ running on Raspberry PI OS Lite (Buster)

Code:

rpicam-lapse --framerate 60 --width 1920 --height 1080 --hdr off --timeout 120s --interval 1s --codec libav --bitrate 2000000 --inline --autofocus-on-capture --autofocus-range full -o test.mp4
Image may be NSFW.
Clik here to view.
Image


And here are some of the rpicam-lapse options I've tested and worked so far:
  • interval, timeout & framerate - Tested for 1 hour with interval set to 1000ms and framerate set 60, consistently produce 1 min video
  • autofocus-on-capture, lens-position & hdr - Tested with Raspberry Pi Camera Module 3 (both with and without HDR)
  • tuning-file - Tested using custom tuning file
  • width & height - Tested with 3840x2160 (4k) and 1920x1080 (1080p)
  • post-process-file - Tested using annotate_cv.json
  • codec
    • h264 (default) - Tested at 1080p60 (4k is not supported)
    • libav - Tested at 1080p60 (HDR) and 4k60 (non-HDR) on mp4 and avi file
      Side note: 4k60 only works by setting "--libav-video-codec libx264". Also, cooling fan (at least for my Pi3B+) is required for 4k timelapse capture
    • mjpeg - Tested at 4k60, but the framerate of the output video set to 25fps for some reason. Also, refer to this if you want to play MJPEG video in VLC.
Hope you enjoy this new application and do provide some feedback. Thanks.
Image may be NSFW.
Clik here to view.
commandExample.png

Statistics: Posted by ongeelim — Fri Dec 27, 2024 6:11 pm



Viewing all articles
Browse latest Browse all 4845

Trending Articles