You are not logged in.
New to scripting and this function has been an issue for me. I need to monitor feeds from different servers inside a VPN.
This function achieves that goal by creating a small window for each video feed.
And I can go back to the script's main menu or close the terminal without closing the vlc processes.
playallstreams() {
nohup cvlc --zoom 0.50 http://server1.com:9000/file1.flv &
nohup cvlc --zoom 0.50 http://server2.com:9000/file2.flv &
. . . more streams . . .
}
I tried the following loop. It either opens the first file and hangs
or, after adding feeds to the list for a total of 5, this code just opens server1's file1.flv 5 times.
streamlist=("http://server1.com:9000/file1.flv" "http://server2.com:9000/file2.flv" "...")
playallstreams() {
for i in "${streamlist[@]}"
do
nohup cvlc --options "${streamlist[@]}" &
done
}
EDIT: Solved, ShellCheck said i was undefined. Changing i to streamlist worked.
Last edited by whiskeytango3000 (2016-06-19 09:46:13)
Offline
nohup cvlc --options $i &
Offline
thank you
Offline
Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.
Offline