Skip to content

Instantly share code, notes, and snippets.

@jg3
Created March 26, 2022 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jg3/2c973bf4477700506cf4098eb9da725f to your computer and use it in GitHub Desktop.
Save jg3/2c973bf4477700506cf4098eb9da725f to your computer and use it in GitHub Desktop.
quick video steream from raspberry pi camera

on the raspberry pi with the camera attached:

libcamera-vid -t 0 --listen -o tcp://0.0.0.0:8888

on the client (my mac laptop)

ffplay tcp://10.39.6.55:8888 -vf "setpts=N/30" -fflags nobuffer -flags low_delay -framedrop

Notes:

Obviously, change the IP address in the client command to the IP or hostname of the raspberry pi. The picture quality isn't super great, but when setting up the frame for a time-lapse shot this gives a quick view of what's in the picture and may help with initial focus.

Based on data from: https://www.raspberrypi.com/documentation/accessories/camera.html#libcamera-vid

Assumes Raspberry Pi Bullseye release or later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment