# Broadcaster owncast
curl -s https://owncast.online/install.sh | bash
cd owncast
./owncast

sudo apt install v4l2loopback-dkms
v4l2-ctl --list-devices

ffmpeg -f alsa -ac 2 -i hw:1,0 -thread_queue_size 64 -f v4l2 -framerate 60 -video_size 1280x720 -input_format yuyv422 -i /dev/video2 -c:v libx264 -preset veryfast -b:v 1984k -maxrate 1984k -bufsize 3968k -vf "format=yuv420p" -g 60 -c:a aac -b:a 128k -ar 44100 -f flv rtmp://localhost/live/Kw12mhxBlBQMsbMZUqNk6qDRgl!


ffmpeg -input_format h264 -f video4linux2 -s 1920x1080 -i /dev/video0 -f lavfi -i anullsrc -c:v copy -c:a aac -shortest -f flv rtmp://localhost/live/Kw12mhxBlBQMsbMZUqNk6qDRgl!

sudo vim /lib/systemd/system/owncast.service

[Unit]
Description=Owncast Service
[Service]
Type=simple
Restart=on-failure
RestartSec=5
WorkingDirectory=/home/grace/owncast
ExecStart=/var/www/owncast/owncast
[Install]
WantedBy=multi-user.target



sudo systemctl daemon-reload
sudo systemctl start owncast
