Restart Streaming automatically

About encoding, codec settings, muxers and filter usage
uniprof
New Cone
New Cone
Posts: 4
Joined: 04 Mar 2012 18:33

Restart Streaming automatically

Postby uniprof » 04 Mar 2012 18:39

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.

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

Re: Restart Streaming automatically

Postby Rémi Denis-Courmont » 05 Mar 2012 09:52

You screwed the command line syntax. You probably missed quotes.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

realjobe
Cone that earned his stripes
Cone that earned his stripes
Posts: 175
Joined: 10 Feb 2008 15:40

Re: Restart Streaming automatically

Postby realjobe » 21 Mar 2012 13:15

2) I want to make possible restart automatically the streaming if the source disconnect for some reason.
--loop I think..

str3tmonk
Blank Cone
Blank Cone
Posts: 40
Joined: 21 Jun 2009 04:43

Re: Restart Streaming automatically

Postby str3tmonk » 07 Apr 2012 02:56

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

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

Re: Restart Streaming automatically

Postby Rémi Denis-Courmont » 07 Apr 2012 10:14

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


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 6 guests