microMinded
Posts: 13
Joined: Tue May 21, 2013 5:46 pm

Recording at multiple resolutions

Mon May 04, 2015 4:01 am

I am interested in knowing how this is actually accomplished low level. Every camera I have used only ever exposes one output stream and you modify it by sending exposure, white balance, fps, etc to the onboard controller. From all the documentation and libmmal code it sure looks like this camera has no brains and all the AWB, exposure, etc is controlled by the mmal library.

Can someone give me the quick and dirty on how the low level interface is exposing two streams to the userland?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26716
Joined: Sat Jul 30, 2011 7:41 pm

Re: Recording at multiple resolutions

Mon May 04, 2015 5:14 pm

The camera can only provide one stream size at a time. Generally when taking stills it's run in a preview mode, lets say 1080p, then when the capture is requested it stops the camera stream, reprograms the cameras to the new resolution, and restarts it for one (perhaps 2) frames, then stops it, goes back to preview mode and restarts it.

Anything else requires the GPU to do scaling on the output from the camera ISP to produce any other resolutions.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

microMinded
Posts: 13
Joined: Tue May 21, 2013 5:46 pm

Re: Recording at multiple resolutions

Mon May 04, 2015 6:24 pm

That's what I figured. The picamera library must be streaming in the highest video quality and down sampling for the other "port". From the description I got it sounded like you could stream say 320x240 and take a full resolution picture at the same time without a context switch.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26716
Joined: Sat Jul 30, 2011 7:41 pm

Re: Recording at multiple resolutions

Tue May 05, 2015 7:54 am

If you set the camera up to stream in full resolution then that is possible, but it only runs at 15fps.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Return to “Camera board”