# CSI camera input to opencv and browser simoultaneously

**URL:** <https://forums.developer.nvidia.com/t/csi-camera-input-to-opencv-and-browser-simoultaneously/157207>\
**Category:** Jetson Nano\
**Tags:** gstreamer, camera\
**Created:** [October 16, 2020, 7:28am UTC](https://forums.developer.nvidia.com/t/csi-camera-input-to-opencv-and-browser-simoultaneously/157207 "2020-10-16T07:28:09Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [October 16, 2020, 9:19am UTC](https://forums.developer.nvidia.com/t/csi-camera-input-to-opencv-and-browser-simoultaneously/157207/3 "2020-10-16T09:19:36Z")

</div>

Hi,  
There is a sample of showing video preview:

> [@OpenCV Video Capture with GStreamer doesn't work on ROS-melodic](https://forums.developer.nvidia.com/t/opencv-video-capture-with-gstreamer-doesnt-work-on-ros-melodic/113147/3):
>
> Hi, Once you confirm the source is valid, you may also try this simple code: import sys import cv2 def read\_cam(): cap = cv2.VideoCapture("nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)NV12, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! appsink") if cap.isOpened(): cv2.namedWindow("demo", cv2.WINDOW\_AUTOSIZE) while True: ret\_val, img = cap.read(); cv2.ims…

Your usecase is advancing and we don’t have experience on it. We would suggest go to [OpenCV forum](https://answers.opencv.org/questions/) to get further help.

---

_[View the full topic](https://forums.developer.nvidia.com/t/csi-camera-input-to-opencv-and-browser-simoultaneously/157207)._
