Article 5PVR4 ffserver - Web UI

ffserver - Web UI

by
kzo81
from LinuxQuestions.org on (#5PVR4)
Hi,

I'd like to be able to set the /etc/ffserver.conf file's parameters from a web UI.

The hardware is a Raspberry Pi and a drone controller which has a USB cable attached to the RPI.

My goal is to be able to set the resolutions at runtime from the Rpi's web interface (NGinX)

This is the html skeleton:

Code:<!DOCTYPE html>
<html>
<body>

<label for="resolutions">Resolutions:</label>

<select id="resolutions">
<option value="640x480">SD</option>
<option value="1024x768">HD</option>
<option value="1920x1080">Full HD</option>
</select>

<button type="button" onclick="alert('Hello world!')">Apply</button>

</body>
</html>I'd like the config file's line:

VideoSize 640x480

be changed when the Apply button is pressed and restart the systemd service. It doesnt matter if the web server runs as root. Do you have an easy and elegant way to change the config file?

I wouldnt like to create a shell sript with sed that changes the appripriate values for each and every properties.
I dont know much about nodeJS but I think that an object could be built up with the ffserver's config file's properties, changed at runtime and written back as a new config file, or just update the appropriate segments.

Thnakslatest?d=yIl2AUoC8zA latest?i=hZAJa1P8qlM:sVT9Iwfnqnw:F7zBnMy latest?i=hZAJa1P8qlM:sVT9Iwfnqnw:V_sGLiP latest?d=qj6IDK7rITs latest?i=hZAJa1P8qlM:sVT9Iwfnqnw:gIN9vFwhZAJa1P8qlM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments