diff --git a/api/index.js b/api/index.js index 5102eb41..57d5beeb 100644 --- a/api/index.js +++ b/api/index.js @@ -98,7 +98,7 @@ function send_image_data_to_clients(videoData) { // Define the endpoint to receive video data app.post("/video", (req, res) => { - console.log("got video endpoint") + // console.log("got video endpoint") let videoData = Buffer.from(""); req.on("data", (chunk) => { @@ -108,7 +108,7 @@ app.post("/video", (req, res) => { req.on("end", () => { // Process the received video data - console.log("Received video data:" + videoData.length); + // console.log("Received video data:" + videoData.length); send_image_data_to_clients(videoData); // Send a response indicating successful receipt diff --git a/src/camera/camera/camera_controller.py b/src/camera/camera/camera_controller.py index dab35e37..6f723ac6 100644 --- a/src/camera/camera/camera_controller.py +++ b/src/camera/camera/camera_controller.py @@ -58,10 +58,10 @@ class CameraController(Node): def handle_video_connection(self): self.get_logger().info('Starting sending video') - vid = cv2.VideoCapture(0) + vid = cv2.VideoCapture(0, cv2.CAP_V4L) - # vid.set(cv2.CAP_PROP_FRAME_WIDTH, RES_4K_W) - # vid.set(cv2.CAP_PROP_FRAME_HEIGHT, RES_4K_H) + vid.set(cv2.CAP_PROP_FRAME_WIDTH, RES_4K_W) + vid.set(cv2.CAP_PROP_FRAME_HEIGHT, RES_4K_H) while True: try: while vid.isOpened():