Page 1 of 1

Restart Streaming automatically

Posted: 04 Mar 2012 18:39
by uniprof
I am streaming a MMS to RTPS with following command:

:sout=#transcode{vcodec=h264,vb=0,scale=0,acodec=mp4a,ab=128,channels=2,samplerate=44100}:rtp{sdp=rtsp://:8554/android.sdp} :sout-keep

2 problems:
1) if I create the stream from VLC this work ok, but if I create by command line this work fine but the local player start to playback the streaming and I don't need it on the server.
2) I want to make possible restart automatically the streaming if the source disconnect for some reason.

thank you.

Re: Restart Streaming automatically

Posted: 05 Mar 2012 09:52
by Rémi Denis-Courmont
You screwed the command line syntax. You probably missed quotes.

Re: Restart Streaming automatically

Posted: 21 Mar 2012 13:15
by realjobe
2) I want to make possible restart automatically the streaming if the source disconnect for some reason.
--loop I think..

Re: Restart Streaming automatically

Posted: 07 Apr 2012 02:56
by str3tmonk
:sout=#transcode{vcodec=h264,vb=0,scale=0,acodec=mp4a,ab=128,channels=2,samplerate=44100}:rtp{sdp=rtsp://:8554/android.sdp} :sout-keep
Firstly, "vb=0" and "scale=1" don't seem correct. I remember something about transcode{} needing at least scale or vb set in order to work.
1) if I create the stream from VLC this work ok, but if I create by command line this work fine but the local player start to playback the streaming and I don't need it on the server.
I think adding "-I dummy" to your command (at the beggining, right after "vlc.exe" or "vlc") will make this command run only on on sout and not on display.
2) I want to make possible restart automatically the streaming if the source disconnect for some reason.
Depending on your source (HTTP? RTSP?) you would set "--http-reconnect=true" after your "sout" (see the VLC man page for more details). In my experience, this hasn't worked properly so I was forced to write a shell script that would check every minute to see if the output was dead and then kill/restart VLC.

Re: Restart Streaming automatically

Posted: 07 Apr 2012 10:14
by Rémi Denis-Courmont
--loop will work for any source. But this assumes the disconnection is actually detectable and detected. So for instance, this will not work for DVB or IPTV.