waveform80 / picamera

A pure Python interface to the Raspberry Pi camera module
https://picamera.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.56k stars 358 forks source link

video delay whith ttyS0 #699

Open leonelinocencio opened 2 years ago

leonelinocencio commented 2 years ago

I'm using PICAMERA v1.13 to send an h264 video in the "ttyS0" with a raspberrypi zero, but the video appears with a delay of 1s or more. Using example 3.13. Recording to a network stream, I don't have this delay in bronser. Below command used.

import pickup

os.system("sudo chmod o+rw /dev/ttyS0") os.system("sudo stty -F /dev/ttyS0 2000000") os.system("sudo stty -F /dev/ttyS0 raw")

camera = picamera.PiCamera() camera.resolution = (640, 480) camera.start_recording('/dev/ttyS0', bitrate=500000) camera.wait_recording(60) camera.stop_recording()

Using the raspivid terminal command, this delay is less than 100ms. raspivid -t 0 -n -ih -w 1280 -h 720 -hf -vf -fps 30 -b 500000 -o /dev/ttyS0

I'm trying to have the video on the control of skydroid T10 obtained via camera with raspberry pi zero.

Esser50K commented 2 years ago

humm not sure what could be causing this and it's probably not the answer you are looking for but there is the picameleon project that let's you access the raspberryPi from other processes and even remotely. Not sure if that's what you want though