GithubHelp home page GithubHelp logo

ventilator / libcamera-streamer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sirbrialliance/libcamera-streamer

0.0 0.0 0.0 5 KB

mjpg-streamer replacment for using new Pi cameras with new OSes and OctoPrint

Home Page: HomePage

License: BSD 2-Clause "Simplified" License

Python 100.00%

libcamera-streamer's Introduction

What

A tool for viwing a Pi camera (libcamera) stream and grabbing snapshot images over HTTP.

Mostly adapted from a certain example.

Why

Usually we use mjpg-streamer for webcam viewing with OctoPrint. Unfortunately, the method it uses to access Pi cameras doens't work with ARM 64-bit Raspian bullseye. (Or probably any 64-bit OS, for that matter.) It uses MMAL for interacting with the camera which doens't have 64-bit support.

And by default, OctoPrint uses mjpg-streamer for the webcam view.

Setup

(Assuming an OctoPi distribution.)

If you ran raspi-confg and turned on Interface Options -> Legacy Camera support that's bad. Turn it off and reboot.

Copy streamer.py to somewhere on the Pi.

apt install libcamera0 libcamera-dev libcamera-apps python3-libcamera python3-picamera2
# Tweak the settings at the start of streamer.py as needed and make sure it runs standalone.
cd /root/bin
service webcamd stop
mv webcamd webcamd.old
ln -s /path/to/streamer.py webcamd
service webcamd start

In OctoPrint -> Settings -> Webcam & Timelapse:

  • Set Stream URL to http://pi_host_or_ip:8070/stream.mjpg
  • Set Snapshot URL to http://pi_host_or_ip:8070/snapshot.jpg (this is a higher resolution image, makes for better time lapses)

libcamera-streamer's People

Contributors

sirbrialliance avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.