Here I'll show you how in a simple way to transcode live video stream over the ubuntu server.
For this you need VLC player which you can install as follows:
first do the update server in the following way; sudo apt-get update
then install the VLC player; sudo apt-get install vlc
then add the new user as follows; sudo adduser username
Now with the program WinSCP can connect to the server and directory home found a folder the user that we added to the server.
In the folder new user add a new file eg. test.sh.
And then continue to the next value for file test.sh.
Then in the file test.sh add the following script:
echo "test 1"
cvlc "input(stream)" --deinterlace=blend --loop --sout-keep --network-caching=3000 --repeat --http-reconnect --http-continuous --sout='#http{access=http, mux=ts, dst=:2500(or dst=:2500/test }' > /dev/null 2>&1 &
Now with PuTTY program connects to the server with the new user name that we added and start file test.sh
./test.sh
Now the stream could work at this address: http://your server ip:2500 or
http://your server ip:2500/test depending on how you set the script.
Nema komentara:
Objavi komentar