Git Product home page Git Product logo

Comments (5)

davidplowman avatar davidplowman commented on June 23, 2024

Hi, thanks for the question. You probably need to set the sensor mode explicitly. You don't say what OS you are using, but this should work:

from picamera2 import Picamera2

picam2 = Picamera2()
main = {'size': (1920, 1080)}
raw = {'size': (2304, 1296)}
controls = {'FrameRate': 50}
config = picam2.create_video_configuration(main, raw=raw, controls=controls)
picam2.configure(config)
picam2.start()

You don't say what kind of Pi you have, but in general only 1080p30 is guaranteed. You can normally just about achieve 1080p50 with a single camera, so long as you're not running too much else. You can't start recording with a 2nd camera without dropping frames. Also, note that 2304x1296 is too large for h264 on Pi 4s or earlier. A Pi 5 should encode that, but it is 44% more pixels than 1080p, so the maximum framerate will drop in proportion.

from picamera2.

Rayanne-M avatar Rayanne-M commented on June 23, 2024

Thanks for you answer ! I'm using the last version of Pi OS 64 bits on a RPi 5. I'll try that tomorrow, and I'll let you know, thanks again :)

from picamera2.

davidplowman avatar davidplowman commented on June 23, 2024

Yes, I think the thing to be aware of is that you have up to about 100 MP/s of throughput. You can divide that up relatively arbitrarily between cameras, framerates and image resolution, though at some point you might find there are additional limits (e.g. really high framerates may struggle however small you make the images). It's always a case of try it and see.

On a Pi 5, always make sure you use "YUV420" format for any stream you wish to pass to the H264 encoder, as that saves an (expensive) software conversion. For best performance, avoid displaying anything, don't run too much else, and consider putting force_turbo=1 into your /boot/firmware/config.txt.

from picamera2.

Rayanne-M avatar Rayanne-M commented on June 23, 2024

Thank you so much ! I managed to record at max 55 fps for a resolution of 960x540 with both camera. For context, we're recording monkeys performing on touchscreen with 2 camera (one on the side and one on the ceilling) with the aim to do an automated tracking of their hands on the screen.

Thus, we'd like to avoid blurred image I've lower the exposure time and it seemed to work. We are also trying to synchronise the camera, for now I've just calculated the time difference between the begining of the cam0 et cam1 recording and i'll cut them afterward. If you have any advice or idea to improve it, you're welcome aha.

Thanks again !

Here is a video of a monkey :)

Nekke_hesitation.mp4

from picamera2.

davidplowman avatar davidplowman commented on June 23, 2024

Glad it's working, and love the video!

One small tip is that you can force lower exposures by setting the "AnalogueGain" control to a fixed value (such as 8.0). This will allow the AEC/AGC to operate at the normal brightness level, but you'll get (effectively) a high ISO image with shorter exposure times. Obviously there's an image noise trade-off here.

from picamera2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.