try changing resolution

This commit is contained in:
Sem van der Hoeven
2023-06-02 15:40:58 +02:00
parent 1a7efcfa23
commit f30a51ca68
2 changed files with 5 additions and 5 deletions

View File

@@ -98,7 +98,7 @@ function send_image_data_to_clients(videoData) {
// Define the endpoint to receive video data // Define the endpoint to receive video data
app.post("/video", (req, res) => { app.post("/video", (req, res) => {
console.log("got video endpoint") // console.log("got video endpoint")
let videoData = Buffer.from(""); let videoData = Buffer.from("");
req.on("data", (chunk) => { req.on("data", (chunk) => {
@@ -108,7 +108,7 @@ app.post("/video", (req, res) => {
req.on("end", () => { req.on("end", () => {
// Process the received video data // 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_image_data_to_clients(videoData);
// Send a response indicating successful receipt // Send a response indicating successful receipt

View File

@@ -58,10 +58,10 @@ class CameraController(Node):
def handle_video_connection(self): def handle_video_connection(self):
self.get_logger().info('Starting sending video') 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_WIDTH, RES_4K_W)
# vid.set(cv2.CAP_PROP_FRAME_HEIGHT, RES_4K_H) vid.set(cv2.CAP_PROP_FRAME_HEIGHT, RES_4K_H)
while True: while True:
try: try:
while vid.isOpened(): while vid.isOpened():