From f263699475e057ae3d17c7e289407a1c5fcd2c52 Mon Sep 17 00:00:00 2001 From: cpu Date: Mon, 1 Jan 2024 19:57:02 +0100 Subject: [PATCH] video params --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 637f911..a81f110 100644 --- a/README.md +++ b/README.md @@ -126,15 +126,17 @@ Type=simple Environment="HOME=/root" Environment=PEERTUBE_LIVE="rtmp://peertube.virtonline.eu:1935/live/LIVE-STREAM-KEY" +Environment=VIDEO_DEVICE="/dev/video0" ExecStartPre=-/usr/bin/env sh -c 'killall ffmpeg 2>/dev/null || true' -ExecStartPre=-/usr/bin/env sh -c 'v4l2-ctl -d /dev/video0 -c video_bitrate=3500000' +# H.264, 1920x1080, 30fps, 3,5Mbit/s +ExecStartPre=-/usr/bin/env sh -c 'v4l2-ctl -d ${VIDEO_DEVICE} -c video_bitrate=3500000' ExecStart=/bin/bash -c 'ffmpeg -loglevel error \ -f v4l2 -input_format h264 \ -video_size 1920x1080 \ -framerate 30 \ - -i /dev/video0 \ + -i ${VIDEO_DEVICE} \ -c copy -f flv \ -tune zerolatency \ ${PEERTUBE_LIVE}'