[vlc-devel] VLC reading SDP files does not re-connect with "--loop"

Sampsa Riikonen sampsa.riikonen at iki.fi
Thu Jul 30 10:12:10 CEST 2015


Dear List,

A) I am reading a multicast streams (video and audio), as described in 
an SDP file, i.e.

vlc -vvv --loop filename.sdp

When I deconnect the camera, vlc goes into the following state for forever:

...
x7f33c00009b8] main input debug: Buffering 0%
[0x7f33c00009b8] main input debug: Buffering 0%
[0x7f33c00009b8] main input debug: Buffering 0%
...

So, it actually never tries to close the socket and re-connect

B) Now, when doing the same with

vlc -vvv --loop rtsp://address

.. and after de-connecting the camera, after a while:

0x7f038c000e78] live555 demux warning: no data received in 10s, eof ?
[0x7f03980009b8] main input debug: EOF reached
[0x1bc1008] main playlist debug: finished input
[0x7f038c00da98] main decoder debug: removing module "avcodec"
[0x7f038c00da98] avcodec decoder debug: ffmpeg codec (H264 - MPEG-4 AVC 
(part 10)) stopped
[0x7f038c00da98] main decoder debug: killing decoder fourcc `h264', 0 
PES in FIFO
...
Opening connection to 192.168.1.165, port 554...
...Connection to server failed: No route to host
Opening connection to 192.168.1.165, port 554...
[0x7f038c0505c8] live555 demux debug: connection timeout
[0x7f038c0505c8] live555 demux error: Failed to connect with 
rtsp://admin:12345@192.168.1.165
[0x7f038c0505c8] main demux debug: no access_demux modules matched
[0x7f0398005878] main input debug: creating access 'rtsp' 
location='admin:12345 at 192.168.1.165', path='(null)'
[0x7f038c050b08] main access debug: looking for access module matching 
"rtsp": 25 candidates
[0x7f038c050b08] main access debug: net: connecting to admin port 12345
[0x7f038c050b08] main access warning: connection timed out
...

And finally, after vlc & live555 have tried to re-connect a few times, 
they gracefully succeed and the video starts flowin' again.

C) I get constantly the following behaviour:
- I let "vlc -vvv -loop filename.sdp" to run for N hours, and finally it 
goes permanently to "more than 5 seconds of late video -> dropping frame 
(computer too slow ?)"
- The image freezes for forever
- During the image freezing, I launch a fresh vlc with the same command 
from another terminal, and it works like a charm.. but again only for N 
hours..!
- Vlc should try to re-connect automatically at some moment !
- I think this problem is related to A and B.


So, my questions are:

Related to (A, B):

1) For the SDP file case, is there any switch / option to tell vlc that 
if data has not been received in N seconds (this is automagic in the 
"rtsp://" case), it should close the sockets and re-connect again (I'm 
talking about the UDP data sockets for video and audio) ?

Related to (C):

2) Any switch / option to tell vlc to close the sockets and re-connect, 
when it goes permanently into the "more than 5 seconds of late video -> 
dropping frame (computer too slow ?)" state?

Related to (A, B, C):

3) Does vlc mediaplayer launch any events for cases (1) and (2), i.e., 
if "player" is a mediaplayer object, then

em=player.event_manager()
em.event_attach(vlc.EventType.XXXXX, callback)

Where "XXXX" is an event, corresponding to a case where data has not 
been received in N secs., or corresponding to a case where it is 
constantly dropping frames?


Regards,

Sampsa





More information about the vlc-devel mailing list