sebelumnya baca dulu cara install python ffmpeg
sebagai contoh saya ingin menjalankan python dengan service systemd supaya lebih mudah:
nano /etc/systemd/system/restream.service
[Unit]Description=YouTube Restream Service[Service]ExecStart=/usr/bin/python3 /root/restream.py "https://www.youtube.com/watch?v=HD5yitW4868"Restart=alwaysUser=root[Install]WantedBy=multi-user.target
sudo systemctl enable stream.servicesudo systemctl start stream.servicesystemctl status stream.service