I need a bash script in which i can restream video links
example i have this link [login to view URL] so i want to restream it via vlc or ffmpeg
cvlc [login to view URL] --sout='#http{mux=ts,dst=:8080/[login to view URL]}'
so this command get [login to view URL] and restream it to [login to view URL]
Also i need
1. Load balancing = if in server1 are connected example 100 user, other users to be redirect to another server
2. maybe we can put a .htaccess in mysite which will allow all visits from my site (jw web player) and it need to allow some ips which can access m3u8 link from everywhere.(not just from mysite)
3. Cron job that will check if a stream goes down to restart it (restart the bash script)
3.