guysoft / OctoPi

Scripts to build OctoPi, a Raspberry PI distro for controlling 3D printers over the web
GNU General Public License v3.0
2.45k stars 368 forks source link

Less CPU load for video capture. #698

Open posicat opened 3 years ago

posicat commented 3 years ago

Working on a project to automate my garage door I found that I was able to get better streaming with less CPU usage using ustreamer instead of mjpg_streamer. Just thought I'd pass that along, as it leaves more CPU free for other functions.

https://github.com/pikvm/ustreamer

reedy commented 3 years ago

Is ustreamer packaged for debian (or derivatives) anywhere? and/or via a PPA/similar? Quick google suggests not, which might be a bit of a blocker for doing this...

And for reference about the benefits of it (used in other projects than just pi-kvm) - https://mtlynch.io/tinypilot/#ustreamer-a-super-fast-video-streamer

tedder commented 3 years ago

doesn't look like debian, but arch and Docker; the latter shows the build chain, and it might be handy to start building up interoperable containers for pi4. (just my thought)

tinypilot talks about the latency win for it.

reedy commented 3 years ago

I imagine it might not be too hard to find a Debian Developer to help get it in for a future release (and then backporting probably becomes a bit easier)...

I just noticed https://github.com/pikvm/ustreamer#building

reedy commented 3 years ago

ustreamer_3.12-1_amd64.changes ACCEPTED into unstable, unstable

It should mean it's part of Debian Bullseye (11)..

reedy commented 3 years ago

And it's in Raspbian Testing now....

reedy commented 3 years ago

https://tracker.debian.org/pkg/ustreamer https://packages.debian.org/bullseye/ustreamer https://repology.org/project/ustreamer/versions

vincele commented 2 years ago

It's in armbian stable also now:

yo@opi:~# cat /etc/debian_version 
11.2
yo@opi:~# apt info ustreamer
Package: ustreamer
Version: 3.16-1
Priority: optional
Section: video
Maintainer: Sam Reed <sam@reedyboy.net>
Installed-Size: 307 kB
Depends: libbsd0 (>= 0.6.0), libc6 (>= 2.17), libevent-2.1-7 (>= 2.1.8-stable), libevent-pthreads-2.1-7 (>= 2.1.8-stable), libjpeg62-turbo (>= 1.3.1), libuuid1 (>= 2.16)
Homepage: https://pikvm.org/
Download-Size: 104 kB
APT-Sources: http://deb.debian.org/debian bullseye/main armhf Packages
Description: Lightweight and fast MJPG-HTTP streamer
guysoft commented 2 years ago

Nice, so I guess we could look in to adding it in the next release. If anyone wants to try and make a PR that could speed things up