Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with Picamera2? #2

Open
rsrawley opened this issue Apr 30, 2023 · 4 comments
Open

Use with Picamera2? #2

rsrawley opened this issue Apr 30, 2023 · 4 comments

Comments

@rsrawley
Copy link

Any chance you could adapt this to work with the new Picamera2 library? I've tried, but the docs are full of examples and don't show much of the syntax. This is needed to use the new module 3 camera. Great job on this as it stands!

@woutersf
Copy link

woutersf commented Jul 7, 2023

Chiming in here. This would be awesome.
My python skills are below zero, but I think it needs something like this:

import picamera2
from picamera2.encoders import H264Encoder

in def stream

    with picamera2.Picamera2() as camera:
        camera.configure(camera.create_video_configuration(main={"size": (640, 480)}))

also this (but I think this is wrong somehow:

        frame_buffer = FrameBuffer()
        encoder = H264Encoder(qp=30)
        camera.capture_file(frame_buffer, format='jpeg')
        camera.start_recording(encoder, frame_buffer)

@woutersf
Copy link

woutersf commented Jul 7, 2023

@woutersf
Copy link

woutersf commented Jul 7, 2023

the above changes give me a working page
but the stream seems not to work.
image

@Cylon-interrogator
Copy link

Hey, how is going? Did you make it work?
Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants