WebThingsIO / onvif-adapter

ONVIF Profile S video camera adapter
Mozilla Public License 2.0
10 stars 6 forks source link

Is it necessary to run ffmpeg process all the time? #16

Closed tssk closed 5 years ago

tssk commented 5 years ago

Why not to start the ffmpeg process only when you actually want to see the video stream?

mrstegeman commented 5 years ago

The adapter has no way of knowing when a user is accessing the stream, so the only other way around running ffmpeg all the time would be to have a start/stop transcoding action (button).

Just for background info, the adapter tells the gateway about a new resource (the stream). The gateway then handles the connection.

tssk commented 5 years ago

Seems to me that opening the "stream" view is clear indication that user wants to see the stream. But if it is not possible to pass this information to adapter to start ffmpeg process then I undestand the current solution.

Thanks for explanantion.

mrstegeman commented 5 years ago

Although not a perfect solution, #19 will at least prevent the system from having to transcode everything at all times.

tssk commented 5 years ago

Big thanks for implementing this! It work just fine.

If I could I would suggest that maybe having only one button as toggle on/off might be more userfriendly. But this works just fine.

mrstegeman commented 5 years ago

Good call, I should have done that in the first place. That's now available in 0.2.1.