# How can I adjust the brightness of a video. cap.set(cv2.CAP\_PROP\_BRIGHTNESS) isn't working

**URL:** <https://forum.opencv.org/t/how-can-i-adjust-the-brightness-of-a-video-cap-set-cv2-cap-prop-brightness-isnt-working/5444>\
**Category:** Python\
**Tags:** videoio\
**Created:** [October 2, 2021, 7:06am UTC](https://forum.opencv.org/t/how-can-i-adjust-the-brightness-of-a-video-cap-set-cv2-cap-prop-brightness-isnt-working/5444 "2021-10-02T07:06:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![i\_am\_confused](https://avatars.discourse-cdn.com/v4/letter/i/7ba0ec/32.png) [@i\_am\_confused](https://forum.opencv.org/u/i_am_confused)\
**Post date:** [October 2, 2021, 7:06am UTC](https://forum.opencv.org/t/how-can-i-adjust-the-brightness-of-a-video-cap-set-cv2-cap-prop-brightness-isnt-working/5444/1 "2021-10-02T07:06:17Z")

</div>

I am fairly new to using OpenCV and on a tutorial, I was shown that you can adjust the brightness of either your webcam or a video by using cap.set(). However, whenever I try setting the values for brightness nothing seems to get happening, and when I use cap.get() to get the brightness value, it always ends up returning 0. What can I do to fix this issue?

```auto
import cv2

videoCapture = cv2.VideoCapture(0)

#Set Brightness
videoCapture.set(cv2.CAP_PROP_BRIGHTNESS, 1000) #Nothing is changed.

current_brightness = videoCapture.get(cv2.CAP_PROP_BRIGHTNESS)
print(current_brightness) #This doesn't work, it keeps returning 0, which isn't suppose to happen.

while True:
    canPlay, vidFrame = videoCapture.read()

    cv2.imshow("Video", vidFrame)

    if cv2.waitKey(1) == ord('q'):
        break

```

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [October 2, 2021, 7:33am UTC](https://forum.opencv.org/t/how-can-i-adjust-the-brightness-of-a-video-cap-set-cv2-cap-prop-brightness-isnt-working/5444/2 "2021-10-02T07:33:26Z")

</div>

> [@i\_am\_confused](#):
>
> `videoCapture.set(cv2.CAP_PROP_BRIGHTNESS, 1000) #Nothing is changed.`

please check the return value here.

then, only a small subset of all properties will be supported by your combo of hw / os / driver / backend.

> [@i\_am\_confused](#):
>
> What can I do to fix this issue?

try another backend, CAP\_DSHOW, CAP\_MSMF, etc.

and please, DO check return values like `canPlay` or `videoCapture.isOpened()`
