Raspivid not starting in Systemd

Hello everyone.

I am trying to get raspivid to start in systemd and created the following service file

sudo nano /lib/systemd/system/fpv.service

I placed the following in the unit file




Doesnt matter what I try raspivid just does not start on boot.

Raspivid works perfect if I start Raspivid in .sh

Hi, Barry

You’ve missed first bracket. Or it’s just copy-paste issue?

Have you enabled the service with sudo systemctl enable fpv.service so that it starts automatically upon boot?

The bracket was probably just copy and paste.

Yes I enabled it with sudo systemctl.

In case you trying to pipe raspivid to another app your ExecStart option should look like this:

ExecStart=/bin/sh -c "/usr/bin/raspivid...... | ......"

OK great ill see if that works. What does the -c do ? and the quotation marks are also necessary?

ExecStart takes commands with their arguments that are executed when this service is started.
Pipe ( | ) is not an argument of raspivid, so the service exited with “Invalid command line option” status.

sh -c creates new instance of shell which reads command from the following string instead of from the standard input.

Ivan, thank you so much for your explanation

YES that worked thank you so much

Thank you again for the help Ivan.

Just a note. A side effect of doing it like that is that one can not add -a"text" any more. its not a deal breaker though