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

Lukas Ruetz lukas.ruetz at gmx.at
Fri Oct 15 16:26:49 CEST 2010


Hi,

Am Freitag 15 Oktober 2010, um 13:42:13 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
> 
> Here's the URL I took the example from:
> http://www.gstreamer.net/data/doc/gstreamer/head/gst-plugins-base-plugins/h
> tml/gst-plugins-base-plugins-xvimagesink.html#gst-plugins-base-plugins-xvim
> agesink.synopsis
> 
> 
> 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.
> 
> 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.
> 
> Thanks in advance,
> 
> Steffen

To your last question:
The "videobalance" element can do this for you, what is propably the easiest
way. If you place it after your source-element you get modified frames in your
pipeline.
If you prefer you can also set this values with external tools like dov4l
or v4lctl before starting your pipeline (or directly call the V4L API in
your code).

Greets,
Lukas





More information about the gstreamer-devel mailing list