I want to save the received stream into a file ,lets say test1 , then if i receive a new stream it will be saved in another file ,test2, the third in test3 ...
this is the script i used . The problem is that when I run it , it get stucked in the vlc command , and when a new stream is received, it will be saved in test.mpg before it get copied.
Note that I want the script to be run all the time.
Code: Select all
#!/bash/sh
label:
cp --backup=numbered test.mpg new
vlc udp:// --sout '#duplicate{dst=display,dst="std{access=file,mux=ps,dst=test.mpg}"}'
goto label: