Skip to content

Instantly share code, notes, and snippets.

@Hermann-SW
Created April 1, 2023 15:31
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Hermann-SW/fca458df2fba9ffc2bab3d1ae01b69c6 to your computer and use it in GitHub Desktop.
Tool like GScrop tool, this time for Raspberry v3 camera
#!/bin/bash
if [[ $# -lt 4 ]]; then echo Format: "$0" width height framerate ms [us]; exit; fi
if [[ $# -gt 4 ]]; then SHTR="--shutter"; else SHTR=""; fi
#TODO patch imx708.ko.xz, then activate with rmmod and modprobe
libcamera-hello --list-cameras | grep "([1-9]"
rm -f /dev/shm/tst.pts /dev/shm/tst.h264
sleep 0.2
libcamera-vid --width "$1" --height "$2" --denoise cdn_off --framerate "$3" --save-pts /dev/shm/tst.pts -t "$4" "$SHTR" "$5" -o /dev/shm/tst.h264 -n ;echo
rm -f tstamps.csv && ptsanalyze /dev/shm/tst.pts
@Hermann-SW
Copy link
Author

Hermann-SW commented Apr 1, 2023

@Hermann-SW
Copy link
Author

shellcheck clean:

pi@raspberrypi4B8:~ $ shellcheck V3crop 
pi@raspberrypi4B8:~ $ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment