Mu2_Deploy/fpv-camera.service

26 lines
1.4 KiB
Desktop File

[Unit]
Description=FPV camera
After=network-online.target
[Service]
## Pipeline for PI camera
#ExecStart=/bin/sh -c 'gst-launch-1.0 v4l2src do-timestamp=true io-mode=mmap device=/dev/video0 extra-controls="controls,rotate=180,image_stabilization=1,h264_profile=4,h264_i_frame_period=60,h264_level=11,power_line_frequency=1,exposure_metering_mong=1,exposure_dynamic_framerate=0,scene_mode=0,video_bitrate_mode=1,video_bitrate=4000000,repeat_sequence_header=1" ! video/x-h264,profile=high,width=1280,height=720,framerate=30/1,stream-format=byte-stream ! h264parse disable-passthrough=true ! rtph264pay config-interval=1 pt=96 mtu=1400 aggregate-mode=zero-latency ! udpsink host=127.0.0.1 port=5602 sync=false'
##
## Pipeline for Logitec C920 camera
# ExecStart=/bin/sh -c "gst-launch-1.0 uvch264src device=/dev/video0 initial-bitrate=4000000 average-bitrate=4000000 iframe-period=1000 name=src auto-start=true src.vidsrc ! video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse disable-passthrough=true ! rtph264pay config-interval=1 pt=96 mtu=1400 aggregate-mode=zero-latency ! udpsink host=127.0.0.1 port=5602 sync=false"
##
## Pipeline for IP Camera
ExecStart=/bin/sh -c "gst-launch-1.0 rtspsrc protocols=tcp location=rtsp:192.168.10.11:8554/main.264 ! udpsink host=127.0.0.1 port=5602 sync=false"
##
Type=simple
Restart=always
RestartSec=1s
TimeoutStopSec=10s
KillMode=control-group
[Install]
WantedBy=multi-user.target