Save the stream

About encoding, codec settings, muxers and filter usage
video_streaming
Blank Cone
Blank Cone
Posts: 11
Joined: 27 Feb 2012 00:47

Save the stream

Postby video_streaming » 28 May 2012 19:57

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 ?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Save the stream

Postby Rémi Denis-Courmont » 29 May 2012 08:46

UDP streams never end.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

video_streaming
Blank Cone
Blank Cone
Posts: 11
Joined: 27 Feb 2012 00:47

Re: Save the stream

Postby video_streaming » 29 May 2012 11:04

Thanks Remi
So is there any way to reach what im trying to do ?
if i use another protocol it works ?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Save the stream

Postby Rémi Denis-Courmont » 29 May 2012 12:19

I don't know what you're trying to do. But I know UDP streams have no end as such.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

video_streaming
Blank Cone
Blank Cone
Posts: 11
Joined: 27 Feb 2012 00:47

Re: Save the stream

Postby video_streaming » 29 May 2012 12:26

I just want to save each stream in a different file. How can I proceed ?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Save the stream

Postby Rémi Denis-Courmont » 29 May 2012 13:50

I don't know what you mean by stream. UDP streams don't end so that question does not make much sense.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

video_streaming
Blank Cone
Blank Cone
Posts: 11
Joined: 27 Feb 2012 00:47

Re: Save the stream

Postby video_streaming » 29 May 2012 14:00

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 .

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Save the stream

Postby Rémi Denis-Courmont » 29 May 2012 14:24

Just use a different output file name for each session. I don't see a problem.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

video_streaming
Blank Cone
Blank Cone
Posts: 11
Joined: 27 Feb 2012 00:47

Re: Save the stream

Postby video_streaming » 29 May 2012 14:35

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Save the stream

Postby Rémi Denis-Courmont » 29 May 2012 14:40

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

video_streaming
Blank Cone
Blank Cone
Posts: 11
Joined: 27 Feb 2012 00:47

Re: Save the stream

Postby video_streaming » 29 May 2012 15:10

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 :(

electronhauler
New Cone
New Cone
Posts: 1
Joined: 15 Jun 2012 19:22

Re: Save the stream

Postby electronhauler » 15 Jun 2012 19:29

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

mrtipale
Blank Cone
Blank Cone
Posts: 14
Joined: 16 Dec 2009 13:19
VLC version: many
Operating System: linux, windows
Location: Mumbai, Paris
Contact:

Re: Save the stream

Postby mrtipale » 24 Jun 2012 22:00

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 :)
Cheers,
Mahendra
mrtipale


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 13 guests