Temporarily turn off uv4l stream to access video device from other application

403 Views Asked by At

I've set up uv4l on my raspberry pi 4 with HQ camera. The http streaming works fine. I'd like to run it 24/7, but I also need occasional livestreaming to Youtube using ffmpeg.

I start uv4l with the option -n videouv4l, so it creates a device /dev/videouv4l that I can use as input for ffmpeg.

But it only works while no one is viewing the stream. If the stream is active, ffmpeg returns with an error that it cannot access the device.

I need a way to disable the stream temporarily, so I can be sure that the device is accessible for ffmpeg. I couldn't find any obvious methods in the documentation, either using a (A) stream disable command over the REST API or by killing the process and (B) launching uv4l again with the stream disabled.

How can I do this?

As for option (B), I tried launching uv4l with the option --server-option '--enable-webrtc=no', but it still enables the http stream.

Regards, Vic

0

There are 0 best solutions below