Page 1 of 1

Save the stream

Posted: 28 May 2012 19:57
by video_streaming
Hello everyone

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:
Anybody can help me please ?

Re: Save the stream

Posted: 29 May 2012 08:46
by Rémi Denis-Courmont
UDP streams never end.

Re: Save the stream

Posted: 29 May 2012 11:04
by video_streaming
Thanks Remi
So is there any way to reach what im trying to do ?
if i use another protocol it works ?

Re: Save the stream

Posted: 29 May 2012 12:19
by Rémi Denis-Courmont
I don't know what you're trying to do. But I know UDP streams have no end as such.

Re: Save the stream

Posted: 29 May 2012 12:26
by video_streaming
I just want to save each stream in a different file. How can I proceed ?

Re: Save the stream

Posted: 29 May 2012 13:50
by Rémi Denis-Courmont
I don't know what you mean by stream. UDP streams don't end so that question does not make much sense.

Re: Save the stream

Posted: 29 May 2012 14:00
by video_streaming
Sorry I wasn't clear.
I mean each session : when the source stops the stream and start a new one it will be saved in a new file on the server and not in the same file .

Re: Save the stream

Posted: 29 May 2012 14:24
by Rémi Denis-Courmont
Just use a different output file name for each session. I don't see a problem.

Re: Save the stream

Posted: 29 May 2012 14:35
by video_streaming
The problem is that the script must be run all the time on the server . So I need a method to save each session dynamically.

Re: Save the stream

Posted: 29 May 2012 14:40
by Rémi Denis-Courmont
Dude, I said all there was to say. There is nothing to add. UDP streams have no end, that's how the protocol is. That is all there is to it. I have no clue what you're trying to do, but it does not look like it makes any sense.

Re: Save the stream

Posted: 29 May 2012 15:10
by video_streaming
Ok i will try to expand the issue.
i have two machines , the source (A) and the server (B).
(A) sends successive streams (not necessary UDP , but all the streams are on the same protocol) to (B) which will save each one in a different file.
A script must be run all the time on the server to handle this.
I Hope i was clear this time :(

Re: Save the stream

Posted: 15 Jun 2012 19:29
by electronhauler
If you are trying to terminate a session while recording a udp stream you can invoke the run-time and stop-time options. The numbers are seconds i.e. 3600=1hour
e.g.
vlc udp://@yourstream --sout=file/ps:c:\folder\placetosavestream\test.mpg --run-time 3600 --stop-time=3600 vlc://quit

Re: Save the stream

Posted: 24 Jun 2012 22:00
by mrtipale
You need detect when exactly when Box (A) will stop sending stream to B. Its the time you need use for saving the stream and getting ready for next stream.
Interesting but i don't think if its possible with vlc for now. Would love to see if its possible :)