# One frame capture

**URL:** <https://forum.opencv.org/t/one-frame-capture/6568>\
**Category:** Python\
**Created:** [December 5, 2021, 9:16am UTC](https://forum.opencv.org/t/one-frame-capture/6568 "2021-12-05T09:16:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AzPyCoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/azpycoder/32/3944_2.png) [@AzPyCoder](https://forum.opencv.org/u/AzPyCoder)\
**Post date:** [December 5, 2021, 9:16am UTC](https://forum.opencv.org/t/one-frame-capture/6568/1 "2021-12-05T09:16:52Z")

</div>

Dear OpenCV forum users,

Please say me how I can capture one of frames from RTSP stream?

```auto
import cv2
cap = cv2.VideoCapture()
cap.open(0, cv2.CAP_DSHOW)

while(True):
    ret, frame = cap.read()
    cv2.imshow('frame', frame)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()

```

This example code create a window with video output, but I want a simple take one screenshot without saving it. Just preview.

Thanks

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [December 5, 2021, 1:38pm UTC](https://forum.opencv.org/t/one-frame-capture/6568/2 "2021-12-05T13:38:19Z")

</div>

this whole forum is for OpenCV. your thread is already in the “Python” section. tagging `cv2` is meaningless.
