[gst-devel] Problems setting brightness value to a v4l2 stream

Stefan Kost ensonic at hora-obscura.de
Fri Oct 15 17:22:54 CEST 2010


Am 15.10.2010 14:42, schrieb Steffen Liebscher:
> Hi guys,
> 
> I'm recently having a project running, concerning an application that 
> aquires images from a video4linux2 source. First of all, I tried both of 
> following commands:
> 
> gst-launch-0.10 videotestsrc ! xvimagesink hue=1000 saturation=1000 
> brightness=1000
> gst-launch-0.10 videotestsrc ! xvimagesink


with the latest gst-plugin-good you can change those parameters on the source
(if the v4l2-device supports it).

> 
> Here's the URL I took the example from:
> http://www.gstreamer.net/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-xvimagesink.html#gst-plugins-base-plugins-xvimagesink.synopsis 
> 

check with "xvinfo" that your xvideo adaptor implements "XV_BRIGHTNESS",
"XV_HUE", ...

> 
> Both images show the exact same image. I tried different values for hue, 
> saturation and brightness but none of the values I set had any effect to 
> the output image. Am I getting something wrong here?
> Corresponding to these results, any changes concerning hue, saturation 
> and brightness to my v4l2 parameters, using the gst-launch tool, had any 
> effect. I also tried both versions, gst-launch and gst-launch-0.10.

gst-launch is a wrapper to selectively use gst-launch-0.10 and gst-launch-0.8,
which not matters these days as everyone should use 0.10.

> 
> Another question I like to ask is: How do I change the brightness value 
> of my v4l2 stream in my source code? As I understand the gstreamer 
> pipeline structure, I need an imagesink to aquire an 
> GstColorBalanceChannel. But if I do so, only my output on screen will be 
> changed, not my frame object that I can access using my playbin which I 
> use for further image processing in my application. Is there a way to 
> set up my video grabber using v4l2 with my desired brightness values? 
> I've been searching for examples and reading the API reference for the 
> past two days but I couldn't find any suitable result.

Try using gst-plugins-good from git. As I mentioned above, you can set it
directly on the source. In older versions v4l2src should still implement the
colorbalance interface if your v4l2device has them. Unfortunately the
colorbalance interface cannot be used via gst-launch, so you need to write a
script/app.

Stefan

> 
> Thanks in advance,
> 
> Steffen
> 
> ------------------------------------------------------------------------------
> Download new Adobe(R) Flash(R) Builder(TM) 4
> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
> Flex(R) Builder(TM)) enable the development of rich applications that run
> across multiple browsers and platforms. Download your free trials today!
> http://p.sf.net/sfu/adobe-dev2dev
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list