Home        Store        Docs        Blog

Setting bitrate for usb camera, H264 stream

(CP) #1

I am trying to set the bitrate of the low light USB camera. I cannot find that option anywhere.
Using v4l2-ctl -L shows a list of commands including brightness, saturation, exposure and so on, but nothing at all about bitrate.

Is there any way to change between constant and variable bitrate, and set the bitrate for the H264 stream?

(Jacob) #2

As far as I am aware, these cameras do not have have the option to change the bitrate. Your only option to adjust bandwidth usage is to change the frame size/frame rate.

(CP) #3

Thanks for your answer.

(CP) #4

Sorry for resurrecting this post. I implemented my own driver for this camera based on v4l2, but there are a lot of things that are not properly supported on the camera side. There is nothing about the video encoding, exposure control, the flags are not used (V4L2_BUF_FLAG_KEYFRAME for example…) which makes the H264 stream hard to use, because you don’t know what you are getting so you have to pretty much decode everything (and that’s impossible for my application, with multiple cameras).

Is there any plan on improving the firmware of the cameras, to support the v4l2 driver better? The bitrate control and the I frame detection are key features to use the h264 streams.


(Jacob) #5

What are you trying to accomplish with your driver? It may be helpful to review the gstreamer v4l2src element code, which is what we use to drive the camera. I’m sorry but we do not have any control over the camera firmware.

(CP) #6

My application is a camera array with image processing (that’s why the I frames are important, because they are cheap to decode in terms of energy consumption).

Anyway, the camera works great in low light, it’s just that the control could be better. If you have a chance to mention that to the manufacturer, please do!