Page 1 of 1

VLC stop restreaming after 3 minutes

Posted: 09 Feb 2010 17:40
by hcan
I am using vlc to restream an rtp stream as another rtp stream. I need this becouse my camera does encodes with H264 baseline level4 and iphone 3G can only stream baseline level 3.

It starts perfectly... everything fine for the first 3 minutes but atfet it, vlc stops streaming. I use a code like below.

vlc -vvv rtsp://user:pwd@x.y.z.t:554/media.amp --sout "#transcode{venc=x264{keyint=60,profile=baseline,level=3.0,nocabac,qpmax=36,qpmin=10,me=hex,merange=24,subme=9,qcomp=0.6},vcodec=x264,vb=500,scale=1,acodec=mp4a,ab=96,channels=2,samplerate=48000}:rtsp{dst=127.0.0.1,port-video=10000,port-audio=10002,sdp= file://%WMSCONFIG_HOME%/content/was.sdp}" --sout-keep --loop

i added " --sout-keep --loop" to keep user connected even the stream stopes. And after 3 minutes restart streaming. This solves the problem but its not good. User buffer for 10 s every 3 minutes for this issue.

Do you have any idea? What could be cousing it?

Thanks for your help.

Re: VLC stop restreaming after 3 minutes

Posted: 13 Feb 2010 00:16
by victor_diago
Hi my friend.

Yes, this also helps with me, but not for every 3 minutes, in my case is 7 minutes instead!

Seems that VLC keeps resetting the connection ! but i dont know why yet.

The rtsp layer on vlc is from livemedia live555 package, i have aleady sent a message to them, but no answers yet.

There is a guy that used freebsd in past and was blaming the live555 people to be guilty for this error, but them was not guilty ! it was a vlc fault : http://lists.live555.com/pipermail/live ... 08977.html

This is what happens : (-vvv mode on !!!!)

Code: Select all

[b][0x810aeb8] live555 demux debug: StreamClose [0x81068b0] main input debug: EOF reached[/b] [0x81068b0] main input debug: waiting decoder fifos to empty vbv buffer overflow [0x814de38] faad decoder debug: AAC SBR (channels: 2, samplerate: 16000) [0x810aaf0] stream_out_transcode stream out debug: drift is too high, resetting master sync [0x814de38] faad decoder debug: AAC SBR (channels: 2, samplerate: 16000) [0x810aaf0] stream_out_transcode stream out debug: drift is too high, resetting master sync [0x8148f58] main packetizer debug: removing module "packetizer_mpeg4video" [0x8148f58] main packetizer debug: killing decoder fourcc `mp4v', 0 PES in FIFO [0x810a360] main stream output debug: removing a sout input (sout_input:0x814d5a8) [0x817f590] main encoder debug: TIMER encoding video frame : 0.917 ms - Total 1888.873 ms / 1869 intvls (Avg 1.011 ms) [0x817ec30] avcodec decoder debug: ffmpeg codec (MPEG-4 Video) stopped [0x817ec30] main decoder debug: removing module "avcodec" [0x817f590] main encoder debug: removing module "avcodec" [0x810f790] avformat mux debug: removing input [0x80fafd0] main playlist debug: finished input [0x81472e8] main packetizer debug: removing module "packetizer_mpeg4audio" [0x81472e8] main packetizer debug: killing decoder fourcc `mp4a', 0 PES in FIFO [0x810a360] main stream output debug: removing a sout input (sout_input:0x814d848) [0x8154e88] main encoder debug: TIMER encoding audio frame : 2.860 ms - Total 8633.037 ms / 3011 intvls (Avg 2.867 ms) [0x814de38] main decoder debug: removing module "faad" [0x8154e88] main encoder debug: removing module "avcodec" [0x810aaf0] main stream out debug: Filter 'bandlimited_resampler' (0x815c1e0) removed from chain [0x815c1e0] main filter debug: removing module "bandlimited_resampler" [0x810aaf0] main stream out debug: Filter 'simple_channel_mixer' (0x8178cc0) removed from chain [0x8178cc0] main filter debug: removing module "simple_channel_mixer" [0x810aaf0] main stream out debug: Filter 'audio_format' (0x817a0f8) removed from chain [0x817a0f8] main filter debug: removing module "audio_format" [0x810f790] avformat mux debug: removing input [0x810f790] main mux warning: no more input streams for this mux Sending request: TEARDOWN rtsp://192.168.0.150:1080/mpeg4/media.amp/ RTSP/1.0 CSeq: 15 Session: 0993223823 Authorization: Basic cm9vdDpyM3N0cjF0MA== User-Agent: VLC media player (LIVE555 Streaming Media v2009.11.27) [0x810aeb8] main demux debug: removing module "live555" [0x81068b0] main input debug: Program doesn't contain anymore ES [0x81068b0] main input debug: thread ended [0x80fafd0] main playlist debug: dead input [0x810a360] main stream output debug: destroying useless sout [0x810aaf0] main stream out debug: destroying chain... (name=transcode) [0x810b8c8] main stream out debug: destroying chain... (name=std) [0x810d858] access_output_http access out warning: HTTP sout access cannot seek [0x810d858] access_output_http access out warning: HTTP sout access cannot seek [0x810d858] access_output_http access out warning: HTTP sout access cannot seek [0x810f790] main mux debug: removing module "avformat" [0x810f560] main http server warning: force closing connections [0x810f560] main http server debug: waitpipe: object killed [0x810f560] main http server debug: HTTP host removed [0x810ee60] main http server debug: no hosts left, stopping httpd [0x810d858] access_output_http access out debug: Close [0x810d858] main access out debug: removing module "access_output_http" [0x810b8c8] main stream out debug: removing module "stream_out_standard" [0x810b8c8] main stream out debug: destroying chain done [0x810aaf0] main stream out debug: removing module "stream_out_transcode" [0x810aaf0] main stream out debug: destroying chain done [0x81068b0] main input debug: TIMER input launching for 'rtsp://ip_address:1080/mpeg4/media.amp' : 3360.048 ms - Total 3360.048 ms / 1 intvls (Avg 3360.048 ms) [0x80fafd0] main playlist debug: changing item without a request (current 0/1) [0x80fafd0] main playlist debug: nothing to play
The strange thing is that on windows this DOESNT HAPPEN. Only on linux !

As i can see vlc is the one that closes the connection, not the rtsp server !

PS : please, can anybody on list help us ?

Re: VLC stop restreaming after 3 minutes

Posted: 13 Feb 2010 00:30
by victor_diago
Hi again !

I have found this topic : viewtopic.php?f=2&t=58959&p=231851&hili ... ps#p196956

Look here ! :

We just confirmed that this is a problem with VLC and the use of GET_PARAMETER as an RTSP stream keep-alive. The latest versions don't "ping" the encoder/server with this keep-alive handshake. This was broken with 0.8.6e, and the problem documented with trac Ticket #1881. Unfortunately, it was recorded as "fixed" when it apparently isn't.
i know we can play more than 20 seconds, but makes sense !

Anyone here can say if its fixed ?

Thanks

Re: VLC stop restreaming after 3 minutes

Posted: 13 Feb 2010 02:35
by victor_diago
My friends,


I think i have issued the problem !

Im running linux inside vmware, and i have tried on a native linux install ! everything worked like a charm.

Im sorry but the problem Seems to be on vmware and not on linux or VLC !

Thanks again !

Re: VLC stop restreaming after 3 minutes

Posted: 07 Sep 2010 19:07
by cycchow
I have the same problem under opensuse 11.0 to 11.3, can I know how to fix it?

HELP ME! WITH FUNCTION LOOP IN A MOSAIC

Posted: 10 Sep 2010 18:50
by Edwin
I have a problem when I streaming two video in a mosaic. I put loop function for each video repeat but when video repeat two time then close!!

Re: VLC stop restreaming after 3 minutes

Posted: 13 Sep 2010 15:17
by victor_diago
Hello All

I have really resolved the problem of stop re-streaming.

cycchow -> My problem was because the rtsp protocol need to use UDP ports to send keepalive acks from client to server, and in my case, udp was blocked !. Then the server after waiting for the never coming ack answers, resets the connection.

To solve this, you can disable your AND your camera firewalls. try on local lan, this is the best way to issue the problem, because the local lan usually dont have a firewall !

Edwin -> please, can you explain how do you do a mosaic ????

Thanks All

Re: VLC stop restreaming after 3 minutes

Posted: 13 Sep 2010 16:49
by Edwin
ok! I want to streaming video endlessly in my mosaic but when repeat two times after vlc close.

Re: VLC stop restreaming after 3 minutes

Posted: 13 Sep 2010 18:39
by victor_diago
Right Edwin, i understand, but i have asked HOW DO YOU CREATED A MOSAIC !

Please, i will need to do it soon, so please, explain me how to do that then i will help you to keep it running ok ?

Thanks in Advance !

Best Regards !

Re: VLC stop restreaming after 3 minutes

Posted: 14 Sep 2010 16:05
by Edwin
ok! This is my code: please check !! Thanks

##################################
## HTTP interface mosaic wizard ##
##################################

# Comment the following line if you don't want to reset your VLM configuration
# del all

# Background options
new bg broadcast enabled
setup bg input "fake://" option "fake-file=C:\VLC\mosaicofinal.png" option "fake-width=960" option "fake-height=648" option "fake-ar=4:3"
setup bg output #transcode{vcodec=WMV1,vb=4096,scale=1,acodec=mpga,ab=512,channels=2,sfilter=mosaic}:bridge-in{offset=100}:duplicate{dst=display,dst=std{access=udp,mux=ts,dst=239.1.5.85:2000,sap,group="sdp",name="test"}} option sout-all

# Mosaic options
setup bg option mosaic-alpha=255
setup bg option mosaic-height=348
setup bg option mosaic-width=300
setup bg option mosaic-align=5
setup bg option mosaic-xoffset=90
setup bg option mosaic-yoffset=250
setup bg option mosaic-vborder=50
setup bg option mosaic-hborder=50
setup bg option mosaic-position=1
setup bg option mosaic-rows=2
setup bg option mosaic-cols=1
setup bg option mosaic-order=video1,video2
setup bg option mosaic-delay=0
setup bg option mosaic-keep-picture

# Input options
new video1 broadcast enabled
setup video1 input "C:\VLC\nike.wmv"
setup video1 output #duplicate{dst=mosaic-bridge{id=video1,width=300,height=149},select=video,dst=bridge-out{id=0},select=audio}

new video2 broadcast enabled
setup video2 input "C:\VLC\nikej.wmv"
setup video2 output #duplicate{dst=mosaic-bridge{id=video2,width=300,height=149},select=video,dst=bridge-out{id=1},select=audio}

# Launch everything
control bg play
control video1 play
control video2 play

# end of mosaic batch

Re: VLC stop restreaming after 3 minutes

Posted: 14 Sep 2010 16:06
by Edwin
is THIS:

##################################
## HTTP interface mosaic wizard ##
##################################

# Comment the following line if you don't want to reset your VLM configuration
# del all

# Background options
new bg broadcast enabled
setup bg input "fake://" option "fake-file=C:\VLC\mosaicofinal.png" option "fake-width=960" option "fake-height=648" option "fake-ar=4:3"
setup bg output #transcode{vcodec=WMV1,vb=4096,scale=1,acodec=mpga,ab=512,channels=2,sfilter=mosaic}:bridge-in{offset=100}:duplicate{dst=display,dst=std{access=udp,mux=ts,dst=239.1.5.85:2000,sap,group="sdp",name="test"}} option sout-all

# Mosaic options
setup bg option mosaic-alpha=255
setup bg option mosaic-height=348
setup bg option mosaic-width=300
setup bg option mosaic-align=5
setup bg option mosaic-xoffset=90
setup bg option mosaic-yoffset=250
setup bg option mosaic-vborder=50
setup bg option mosaic-hborder=50
setup bg option mosaic-position=1
setup bg option mosaic-rows=2
setup bg option mosaic-cols=1
setup bg option mosaic-order=video1,video2
setup bg option mosaic-delay=0
setup bg option mosaic-keep-picture

# Input options
new video1 broadcast enabled loop
setup video1 input "C:\VLC\nike.wmv"
setup video1 output #duplicate{dst=mosaic-bridge{id=video1,width=300,height=149},select=video,dst=bridge-out{id=0},select=audio}

new video2 broadcast enabled loop
setup video2 input "C:\VLC\nikej.wmv"
setup video2 output #duplicate{dst=mosaic-bridge{id=video2,width=300,height=149},select=video,dst=bridge-out{id=1},select=audio}

# Launch everything
control bg play
control video1 play
control video2 play

# end of mosaic batch

Re: VLC stop restreaming after 3 minutes

Posted: 17 Sep 2010 15:32
by Edwin
I need answer about last code!!! Thanks!!

Re: VLC stop restreaming after 3 minutes

Posted: 17 Sep 2010 16:50
by victor_diago
Right !

You are using vlc in a way that i dont know !~i only know command line, but i will study your code to issue the problem ok ?

thank you

Re: VLC stop restreaming after 3 minutes

Posted: 02 Oct 2010 12:52
by cycchow
I have check the udp port is opened, however this problem only found in linux, but not in windows.