add initial ramblings
This commit is contained in:
parent
81be396377
commit
964d43e29e
24
README.md
24
README.md
|
@ -1,3 +1,23 @@
|
|||
# droidcam-with-octoprint
|
||||
# Droidcam with OctoPrint
|
||||
|
||||
Making OctoPrint work with Droidcam
|
||||
I'll write setup instructions at some point. Right now I'm tired of all the crap I had to go through to figure this out.
|
||||
|
||||
This also expects that you're using OctoPrint's Raspberry Pi image, for other systems you'll probably have to adapt a bit.
|
||||
|
||||
### Links
|
||||
|
||||
- https://github.com/blueimp/mjpeg-server
|
||||
- https://github.com/libimobiledevice/usbmuxd
|
||||
- https://github.com/dev47apps/droidcam/issues/6#issuecomment-657677219
|
||||
|
||||
### Notes
|
||||
|
||||
`/etc/modules`
|
||||
```
|
||||
v4l2loopback
|
||||
```
|
||||
|
||||
`/etc/modprobe.d/v4l2loopback.conf`
|
||||
```
|
||||
options v4l2loopback devices=1 video_nr=1
|
||||
```
|
||||
|
|
3
services/README.md
Normal file
3
services/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# systemd service files
|
||||
|
||||
These should go into `/etc/systemd/user`.
|
17
services/droidcam-streamer.service
Normal file
17
services/droidcam-streamer.service
Normal file
|
@ -0,0 +1,17 @@
|
|||
[Unit]
|
||||
Description=DroidCam streaming
|
||||
BindsTo=droidcam.service
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
# this is cursed
|
||||
ExecStart=/home/pi/go/bin/mjpeg-server -a ":8080" -b gaysex -- bash -c 'while [[ true ]]; do gst-launch-1.0 -v v4l2src device=/dev/video1 ! videoconvert ! video/x-raw,format=I420 ! v4l2jpegenc ! multipartmux boundary=gaysex ! filesink location=/dev/stdout || true; done'
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
# Old transcoding command, ffmpeg hammered the CPU way too much and doesn't have support for the v4l2 mjpeg encoder. gstreamer performs leagues better
|
||||
# ExecStart=/home/pi/go/bin/mjpeg-server -a ":8080" -- ffmpeg -i /dev/video1 -fflags nobuffer -an -r 15 -f mpjpeg -q 2 -
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
12
services/droidcam.service
Normal file
12
services/droidcam.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=DroidCam streaming
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/droidcam-cli -nocontrols -dev=/dev/video1 -size=1280x720 ios 57192
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
Loading…
Reference in a new issue