Comments (2)
Just because this shows up on google. It's because systemd doesn't run a bash shell, so it just runs the command as given, which in your case is ffmpeg, and that command has no idea what a pipe is.
The script works, as it's basically running /bin/bash and then passing it the command, an alternative is to do so in the unit file directly:
[Unit]
Description=Streameye MJPEG service
[Service]
User=pi
ExecStart=/bin/bash -c "/usr/bin/python3 /home/pi/streameye/extras/raspimjpeg.py -w 1280 -h 720 -r 15 | streameye"
Restart=on-failure
RestartSec=2
[Install]
WantedBy=multi-user.target
This calls /bin/bash
where -c
means read command from string
In my case I'm using raspimjpeg, as I'm on a pizero, but the idea applies to your case as well
from streameye.
Well...I don't quite know why it works like this, but it does if I call an external shell script...
[Unit]
Description=StreamEye MJPEG Service
[Service]
ExecStart=/usr/local/bin/start_streameye.sh
Restart=on-failure
RestartSec=2
[Install]
WantedBy=multi-user.target
/usr/local/bin/start_streameye.sh
#!/bin/bash
/usr/bin/ffmpeg -loglevel panic -f video4linux2 -i /dev/video0 -r 30 -s 640x480 -f mjpeg -q:v 3 - | /usr/local/bin/streameye
from streameye.
Related Issues (20)
- Implementing OpenCV HOT 3
- [raspimjpeg.py] TypeError raised on startup HOT 2
- Multiple streams one server HOT 1
- streameye dependancys HOT 8
- Getting this after keyboard interruption HOT 1
- Missing stdio.h HOT 1
- need to make a stream extension for some programs HOT 1
- Can't get example to work HOT 4
- Slow Wifi vs MotionEyeOS
- Network Share Not Connecting
- Feature Request: SIGUSR1 on --capture-movie to capture a still image
- raspimjpeg.py - two line changes HOT 1
- Annotation text overlay / stream another image ?
- Audio Broadcast HOT 2
- Feature request. URL path
- Audio output over stream
- not all data could be written / failed to write jpeg data HOT 3
- Add support for serving single JPEG snapshot. HOT 2
- Really slow framerate... HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streameye.