User avatar
HermannSW
Posts: 1874
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Raspberry v2 camera [email protected]

Wed Jan 15, 2020 1:36 pm

Raspberry v2 camera allows for framerate up to 200fps with raspivid mode 7.
Documentation has comment on what to do when using >120fps:
https://www.raspberrypi.org/documentati ... /camera.md

I never used "-ex off" and got [email protected] without frameskips often in different scenarios, until yesterday.
I did want to record the drops of medicine falling onto a spoon.
Before doing so, I did this command for adjusting camera to scene:

Code: Select all

raspivid -md 7 -w 640 -h 480 -p 22,50,640,480 -fps 150 -pts tst.pts -o tst.h264 -t 0

I have done that so often before, but was not able to get away without frameskips while recording this constant scene:
Image

I don't get what is so complex in that (constant) scene.
I even replaced locations to to ramdisk ("/dev/shm/tst.pts" and "/dev/shm/tst.h264"), no change.
I went down to 120fps and still frameskips.
Finally I ended up with 101fps (not 100fps because "./ptsanalyze tst.pts 0" does not like it) with no frameskips:
https://github.com/Hermann-SW/userland/ ... ptsanalyze


I did "ffmepg -i tst.h264 frame.%04d.pnm", selected interesting range for frames, did pnmrotate all frames by -90°, copied frames in reverse order after end of sequence for back-and-forth, and used gifenc.sh to create a 25fps animated gif, playing 4 times slower than real. Looks nice:
Image
Attachments
medicine.frame.0012.png
mdeicine.frame.0012.png
medicine.frame.0012.png (239.92 KiB) Viewed 128 times
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

Return to “Camera board”