- Install dependencies
Installation on Ubuntu/Debian systems
apt update -y && apt install vim screen -y
Installation on CentOS systems
yum update -y && yum install vim screen -y
- Install ffmpeg
Install ffmpeg on Ubuntu/Debian systems
apt install ffmpeg
Install ffmpeg on CentOS systems
yum install epel-release
rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
yum install ffmpeg ffmpeg-devel
Check if the installation was successful
ffmpeg -version
- Download streaming script and upload live video
Download the streaming script: Click here to enter
Upload the video you want to stream to the root directory
Note: Currently supports streaming of mp4 format videos in a loop, video file names cannot contain spaces or other special characters
- Open a new window (Note: This point is crucial)
screen -S stream
- Execute the run command (Note: Here, the script filename is executed, if the filename is changed, the stream.sh should be changed to the corresponding filename)
bash stream.sh
- Open a new page to find the ID
screen -ls
- Then remotely detach
screen -d id
- Close the corresponding window
screen -X -S id quit
- Reopen the corresponding window
screen -r id
- Force stop streaming
pkill -f "ffmpeg"