uvdl / camera-streamer

code to setup gstreamer video+audio pipelines on various systems
GNU General Public License v3.0
2 stars 0 forks source link

drop command-line settings for video-stream.sh #7

Open bvacaliuc opened 3 years ago

bvacaliuc commented 3 years ago

Since the most convenient use of this module is to setup and run a service which is configured by a systemd-compatible .conf, file, there is rather little point in maintaining command line parameters. Furthermore, there are key parameters that can only be given in environment variables.

So:

UDP_HOST=172.18.1.29 UDP_PORT=5600 UDP_IFACE=enp6s0 ./video-stream.sh 1280 720 15 1800 rtmp://video.blahblah.com:1935/live/BLAH testpi encd,h264,rtmp,udp,debug

Could just as well be given by:

UDP_HOST=172.18.1.29 UDP_PORT=5600 UDP_IFACE=enp6s0 WIDTH=1280 HEIGHT=720 FPS=15 VIDEO_BITRATE=1800 URL=rtmp://video.blahblah.com:1935/live/BLAH SKEY=testpi FLAGS="encd,h264,rtmp,udp,debug" ./video-stream.sh
bvacaliuc commented 3 years ago

I suppose width, height, fps and bitrate might be nice to keep as command-line overrides for diagnostic and testing, but I think the rest of the stuff including the flags should just be pulled from the environment.