I found the problem. The python script ended, so the RPi returned to the desktop. Hence the blip.
When I inserted the following to the program, it worked fine.Code:
from picamera2 import Picamera2, Previewfrom libcamera import Transformpicam2 = Picamera2()picam2.start_preview(Preview.QTGL, x=100, y=200, width=800, height=600, transform=Transform(vflip=1))picam2.start()# inserted to keep the program runningwhile True:x=1
Which is one of the things I suggested above.
However I wouldn't do it like that as your code will use 100% of a CPU core which is not desirable.
Try (my changes bracketed by ##):
Code:
##from signal import pause##from picamera2 import Picamera2, Previewfrom libcamera import Transformpicam2 = Picamera2()picam2.start_preview(Preview.QTGL, x=100, y=200, width=800, height=600, transform=Transform(vflip=1))picam2.start()# inserted to keep the program running##pause()##Code:
##from time import sleep##from picamera2 import Picamera2, Previewfrom libcamera import Transformpicam2 = Picamera2()picam2.start_preview(Preview.QTGL, x=100, y=200, width=800, height=600, transform=Transform(vflip=1))picam2.start()# inserted to keep the program runningwhile True: ## time.sleep(1) # sleep for 1 second ##Statistics: Posted by thagrol — Tue Nov 25, 2025 6:15 pm