Help request - remotely control picamera

Hello,

I am an absolute beginner with Raspberry Pi.

A project I am working on is trying to make an object tracking device with a pan hat tilt. I am trying to do so I can run the code through ssh remotely on a laptop and see the camera as well as press some keys and different object tracking methods will start.

I found lots of resources on how to do the tracking and the switching between methods by pressing keys, but I can’t seem to access my camera remotely. I found a few methods in some websites, but they are not working. for example, running this before a script

#!/bin/bash

export DISPLAY=:0

libcamera-vid -t 0 -f --width 1920 --height 1080 --framerate 24 --exposure normal --awb auto --brightness -0. --vflip --hflip

I am trying on VS Code, but I keep getting error. i tried some other methods that were similar, with no progress.
last resort was to ask ChatGPT to write me a code too, but still not working. (attached picture)


I would appreciate any help:)

1 Like

Suggest you use the VNC Raspberry Pi interface. It will show the Pi screen and allow you to do stuff on the Pi remotely.
RealVNC Viewer is what I use on my PC to connect to the Pi, works pretty good so far.

Cheers
Jim

2 Likes

Hi @m288784

Welcome to the forum!

My preference for remote accessing my devices is Google Remote Desktop. It has been deprecated for a while but I haven’t run into any issues using it.