<div class="gmail_quote">Hello,<br><br>I am using VLC 0.9.10 with live555 snapshot live.2010.01.13.tar.gz to receive and decode multicast content from an Axis 213 PTZ camera (version 4.35.1 firmware). However, I kept getting the following error about 60% of the time when trying to invoke it from the command line:<br>
<br>[root@mediaport102 ~]# export DISPLAY=:0.0; vlc -vvvvv --noosd --fullscreen --m4v-fps 30 --rtsp-mcast -I rc --no-audio rtsp://<a href="http://dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp" target="_blank">dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp</a><br>
VLC media player 0.9.10 Grishenko<br>[00000001] main libvlc debug: VLC media player - version 0.9.10 Grishenko - (c) 1996-2009 the VideoLAN team<br>[00000001] main libvlc debug: libvlc was configured with ../configure '--prefix=/usr' '--libdir=/usr/lib64' '--with-live555-tree=/usr/lib64/live' '--enable-run-as-root' '--enable-debug' 'LDFLAGS=-L/usr/lib64'<br>
LibVLC has detected an unusable buggy GNU/libc version.<br>Please update to version 2.8 or newer.<br>[00000001] main libvlc debug: translation test: code is "C"<br>[00000001] main libvlc debug: checking builtin modules<br>
[00000001] main libvlc debug: checking plugin modules<br>[00000001] main libvlc debug: loading plugins cache file /root/.cache/vlc/plugins-04081e.dat<br>[00000001] main libvlc debug: recursively browsing `/usr/lib64/vlc'<br>
[00000001] main libvlc debug: module bank initialized, found 259 modules<br>[00000001] main libvlc warning: Unable to get HAL device properties<br>[00000001] main libvlc debug: opening config file (/root/.config/vlc/vlcrc)<br>
[00000001] main libvlc debug: CPU has capabilities 486 586 MMX 3DNow! MMXEXT SSE SSE2 FPU <br>[00000001] main libvlc debug: looking for memcpy module: 4 candidates<br>[00000001] main libvlc debug: using memcpy module "memcpymmxext"<br>
[00000686] main interaction debug: thread 1098783040 (Interaction control) created at priority 0 (../../src/interface/interaction.c:382)<br>[00000686] main interaction debug: thread started<br>[00000688] main input debug: Creating an input for 'Media Library'<br>
[00000688] main input debug: Input is a meta file: disabling unneeded options<br>[00000688] main input debug: `file/xspf-open:///root/.local/share/vlc/ml.xspf' gives access `file' demux `xspf-open' path `/root/.local/share/vlc/ml.xspf'<br>
[00000688] main input debug: creating access 'file' path='/root/.local/share/vlc/ml.xspf'<br>[00000689] main access debug: looking for access module: 3 candidates<br>[00000689] access_file access debug: opening file `/root/.local/share/vlc/ml.xspf'<br>
[00000689] main access debug: using access module "access_file"<br>[00000689] main access debug: TIMER module_Need() : 0.467 ms - Total 0.467 ms / 1 intvls (Avg 0.467 ms)<br>[00000690] main stream debug: Using AStream*Stream<br>
[00000690] main stream debug: pre-buffering...<br>[00000690] main stream debug: received first data for our buffer<br>[00000688] main input debug: creating demux: access='file' demux='xspf-open' path='/root/.local/share/vlc/ml.xspf'<br>
[00000691] main demux debug: looking for demux module: 1 candidate<br>[00000691] playlist demux debug: using XSPF playlist reader<br>[00000691] main demux debug: using demux module "playlist"<br>[00000691] main demux debug: TIMER module_Need() : 1.042 ms - Total 1.042 ms / 1 intvls (Avg 1.042 ms)<br>
[00000688] main input debug: `file/xspf-open:///root/.local/share/vlc/ml.xspf' successfully opened<br>[00000692] main xml debug: looking for xml module: 2 candidates<br>[00000692] main xml debug: using xml module "xml"<br>
[00000692] main xml debug: TIMER module_Need() : 0.855 ms - Total 0.855 ms / 1 intvls (Avg 0.855 ms)<br>[00000691] playlist demux debug: parsed 0 tracks successfully<br>[00000692] main xml debug: removing module "xml"<br>
[00000688] main input debug: EOF reached<br>[00000688] main input debug: control type=1<br>[00000691] main demux debug: removing module "playlist"<br>[00000689] main access debug: removing module "access_file"<br>
[00000688] main input debug: Destroying the input for 'Media Library'<br>[00000688] main input debug: TIMER input launching for 'Media Library' : 11.250 ms - Total 11.250 ms / 1 intvls (Avg 11.250 ms)<br>
[00000693] main preparser debug: waiting for thread initialization<br>
[00000693] main preparser debug: thread started<br>[00000693] main preparser debug: thread 1085921600 (preparser) created at priority 0 (../../src/playlist/thread.c:79)<br>[00000694] main fetcher debug: waiting for thread initialization<br>
[00000694] main fetcher debug: thread started<br>[00000694] main fetcher debug: thread 1109272896 (fetcher) created at priority 0 (../../src/playlist/thread.c:108)<br>[00000687] main playlist debug: waiting for thread initialization<br>
[00000687] main playlist debug: thread started<br>[00000687] main playlist debug: thread 1119762752 (playlist) created at priority 0 (../../src/playlist/thread.c:117)<br>[00000695] main interface debug: looking for interface module: 1 candidate<br>
[00000687] main playlist debug: rebuilding array of current - root Playlist<br>[00000687] main playlist debug: rebuild done - 0 items, index -1<br>[00000695] main interface debug: using interface module "hotkeys"<br>
[00000695] main interface debug: TIMER module_Need() : 0.772 ms - Total 0.772 ms / 1 intvls (Avg 0.772 ms)<br>[00000695] main interface debug: thread 1130252608 (interface) created at priority 0 (../../src/interface/interface.c:168)<br>
[00000696] main interface debug: looking for interface module: 1 candidate<br>[00000695] main interface debug: thread started<br>[00000696] main interface debug: using interface module "inhibit"<br>[00000696] main interface debug: TIMER module_Need() : 112.259 ms - Total 112.259 ms / 1 intvls (Avg 112.259 ms)<br>
[00000696] main interface debug: thread 1140742464 (interface) created at priority 0 (../../src/interface/interface.c:168)<br>[00000697] main interface debug: looking for interface module: 1 candidate<br>[00000697] main interface debug: using interface module "screensaver"<br>
[00000697] main interface debug: TIMER module_Need() : 0.116 ms - Total 0.116 ms / 1 intvls (Avg 0.116 ms)<br>[00000697] main interface debug: thread 1151232320 (interface) created at priority 0 (../../src/interface/interface.c:168)<br>
[00000687] main playlist debug: adding item `rtsp://<a href="http://dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp" target="_blank">dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp</a>' ( rtsp://<a href="http://dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp" target="_blank">dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp</a> )<br>
[00000698] main interface debug: looking for interface module: 18 candidates<br>[00000698] main interface debug: using interface module "signals"<br>[00000698] main interface debug: TIMER module_Need() : 0.095 ms - Total 0.095 ms / 1 intvls (Avg 0.095 ms)<br>
[00000698] main interface debug: thread 1172212032 (interface) created at priority 0 (../../src/interface/interface.c:168)<br>[00000699] main interface debug: looking for interface module: 18 candidates<br>Remote control interface initialized. Type `help' for help.<br>
[00000699] main interface debug: using interface module "rc"<br>[00000699] main interface debug: TIMER module_Need() : 0.296 ms - Total 0.296 ms / 1 intvls (Avg 0.296 ms)<br>[00000696] main interface debug: thread started<br>
[00000687] main playlist debug: rebuilding array of current - root Playlist<br>[00000687] main playlist debug: rebuild done - 1 items, index -1<br>[00000697] main interface debug: thread started<br>[00000698] main interface debug: thread started<br>
[00000699] main interface debug: thread 1182701888 (interface) created at priority 0 (../../src/interface/interface.c:168)<br>[00000687] main playlist debug: starting new item<br>[00000687] main playlist debug: processing request item null node Playlist skip 0<br>
[00000687] main playlist debug: creating new input thread<br>[00000700] main input debug: Creating an input for 'rtsp://<a href="http://dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp" target="_blank">dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp</a>'<br>
[00000699] main interface debug: thread started<br>[00000700] main input debug: thread started<br>[00000700] main input debug: waiting for thread initialization<br>[00000700] main input debug: `rtsp://<a href="http://dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp" target="_blank">dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp</a>' gives access `rtsp' demux `' path `<a href="http://dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp" target="_blank">dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp</a>'<br>
[00000700] main input debug: creating demux: access='rtsp' demux='' path='<a href="http://dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp" target="_blank">dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp</a>'<br>
[00000701] main demux debug: looking for access_demux module: 1 candidate<br>[00000700] main input debug: thread 1193191744 (input) created at priority 10 (../../src/input/input.c:370)<br>Sending request: OPTIONS rtsp://<a href="http://172.19.3.223:554/mpeg4/media.amp" target="_blank">172.19.3.223:554/mpeg4/media.amp</a> RTSP/1.0<br>
CSeq: 1<br>User-Agent: VLC media player (LIVE555 Streaming Media v2009.07.27)<br><br><br>Received OPTIONS response: RTSP/1.0 200 OK<br>CSeq: 1<br>Public: DESCRIBE, GET_PARAMETER, PAUSE, PLAY, SETUP, SET_PARAMETER, TEARDOWN<br>
<br><br>Sending request: DESCRIBE rtsp://<a href="http://172.19.3.223:554/mpeg4/media.amp" target="_blank">172.19.3.223:554/mpeg4/media.amp</a> RTSP/1.0<br>CSeq: 2<br>Accept: application/sdp<br>User-Agent: VLC media player (LIVE555 Streaming Media v2009.07.27)<br>
<br><br>Received DESCRIBE response: RTSP/1.0 401 Unauthorized<br>CSeq: 2<br>WWW-Authenticate: Basic realm="/"<br><br><br>Sending request: DESCRIBE rtsp://<a href="http://172.19.3.223:554/mpeg4/media.amp" target="_blank">172.19.3.223:554/mpeg4/media.amp</a> RTSP/1.0<br>
CSeq: 3<br>Accept: application/sdp<br>Authorization: Basic ZGNhbXBiZWxsOm1zZHZpZGVv<br>User-Agent: VLC media player (LIVE555 Streaming Media v2009.07.27)<br><br><br>Received DESCRIBE response: RTSP/1.0 200 OK<br>CSeq: 3<br>
Content-Base: rtsp://<a href="http://172.19.3.223:554/mpeg4/media.amp/" target="_blank">172.19.3.223:554/mpeg4/media.amp/</a><br>Content-Type: application/sdp<br>Content-Length: 696<br><br><br>Need to read 696 extra bytes<br>
Read 696 extra bytes: v=0<br>
o=- 18951009734492 18951009734498 IN IP4 172.19.3.223<br>s=Media Presentation<br>e=NONE<br>c=IN IP4 0.0.0.0<br>b=AS:8000<br>t=0 0<br>a=control:*<br>a=range:npt=now-<br>a=mpeg4-iod: "data:application/mpeg4-iod;base64,AoDUAE8BAf/1AQOAbwABQFBkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCxBUjBCR3dVZkF4Y0F5U1FBWlFRTklCRUVrK0FBZWhJQUFIb1NBQVlCQkE9PQQNAQUABAAAAAAAAAAAAAYJAQAAAAAAAAAAAzoAAkA2ZGF0YTphcHBsaWNhdGlvbi9tcGVnNC1iaWZzLWF1O2Jhc2U2NCx3QkFTWVFTSVVFVUZQd0E9BBICDQAAAgAAAAAAAAAABQMAAEAGCQEAAAAAAAAAAA=="<br>
m=video 0 RTP/AVP 96<br>b=AS:8000<br>a=framerate:30<br>a=control:trackID=1<br>a=rtpmap:96 MP4V-ES/90000<br>a=fmtp:96 profile-level-id=245; config=000001B0F5000001B509000001000000012008D49D88032516043C14440F;<br>a=mpeg4-esid:201<br>
<br>[00000701] live555 demux debug: RTP subsession 'video/MP4V-ES'<br>Sending request: SETUP rtsp://<a href="http://172.19.3.223:554/mpeg4/media.amp/trackID=1" target="_blank">172.19.3.223:554/mpeg4/media.amp/trackID=1</a> RTSP/1.0<br>
CSeq: 4<br>Transport: RTP/AVP;multicast;client_port=36916-36917<br>Authorization: Basic ZGNhbXBiZWxsOm1zZHZpZGVv<br>User-Agent: VLC media player (LIVE555 Streaming Media v2009.07.27)<br><br><br>Received SETUP response: RTSP/1.0 200 OK<br>
CSeq: 4<br>Session: 1886570945;timeout=60<br>Transport: RTP/AVP;multicast;destination=239.209.84.157;ttl=5;port=50000-50001;mode="PLAY"<br><br><br>[00000700] main input debug: selecting program id=0<br>[00000701] live555 demux debug: setup start: 0 stop:0<br>
Sending request: PLAY rtsp://<a href="http://172.19.3.223:554/mpeg4/media.amp/" target="_blank">172.19.3.223:554/mpeg4/media.amp/</a> RTSP/1.0<br>CSeq: 5<br>Session: 1886570945<br>Range: npt=0.000-<br>Authorization: Basic ZGNhbXBiZWxsOm1zZHZpZGVv<br>
User-Agent: VLC media player (LIVE555 Streaming Media v2009.07.27)<br><br><br>Received PLAY response: RTSP/1.0 200 OK<br>CSeq: 5<br>Session: 1886570945<br>Range: npt=now-<br>RTP-Info: url=trackID=1;seq=7996;rtptime=3557386590<br>
<br><br>[00000701] live555 demux debug: We have a timeout of 60 seconds<br>[00000702] main generic debug: waiting for thread initialization<br>[00000702] main generic debug: thread started<br>[00000702] main generic debug: thread 1203681600 (liveMedia-timeout) created at priority 0 (../../../modules/demux/live555.cpp:1055)<br>
[00000701] live555 demux debug: spawned timeout thread<br>[00000701] live555 demux debug: play start: 0 stop:0<br>[00000701] main demux debug: using access_demux module "live555"<br>[00000701] main demux debug: TIMER module_Need() : 89.912 ms - Total 89.912 ms / 1 intvls (Avg 89.912 ms)<br>
[00000703] main decoder debug: looking for decoder module: 26 candidates<br>[00000703] avcodec decoder debug: libavcodec initialized (interface 3412992 )<br>[00000703] avcodec decoder debug: using direct rendering<br>[00000703] avcodec decoder debug: ffmpeg codec (MPEG-4 Video) started<br>
[00000703] main decoder debug: using decoder module "avcodec"<br>[00000703] main decoder debug: TIMER module_Need() : 14.274 ms - Total 14.274 ms / 1 intvls (Avg 14.274 ms)<br>[00000703] main decoder debug: thread 1214171456 (decoder) created at priority 0 (../../src/input/decoder.c:217)<br>
[00000700] main input debug: `rtsp://<a href="http://dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp" target="_blank">dcampbell:msdvideo@172.19.3.223:554/mpeg4/media.amp</a>' successfully opened<br>BasicTaskScheduler::SingleStep(): select() fails: Bad file descriptor<br>
[00000703] main decoder debug: thread started<br><br>By turning on debugging I was able to ascertain that the problem was that the fd_set socket handle mask for the 'select()' call was not getting updated when RTP and RTCP sockets were closed and reopened with different file descriptor values because of a multicast address/port changed flagged by the RTSP stack. Below is the diff between the 'stock' file and modified file and attached is an attempted patch. The patch does work, but there may or may not be some other pitfalls that are not readily apparent to me.<br>
<br>[root@devkrakora live-latest]# diff -uN live/liveMedia/MediaSession.cpp live.modified/liveMedia/MediaSession.cpp<br>--- live/liveMedia/MediaSession.cpp 2010-01-13 02:19:35.000000000 -0500<br>+++ live.modified/liveMedia/MediaSession.cpp 2010-01-14 20:44:35.000000000 -0500<br>
@@ -976,21 +976,38 @@<br> netAddressBits destAddress = connectionEndpointAddress();<br> if (destAddress == 0) destAddress = defaultDestAddress;<br> struct in_addr destAddr; destAddr.s_addr = destAddress;<br>-<br>+ <br>
// The destination TTL remains unchanged:<br> int destTTL = ~0; // means: don't change<br> <br> if (fRTPSocket != NULL) {<br>+ fRTPSource->stopGettingFrames();<br> Port destPort(serverPortNum);<br> fRTPSocket->changeDestinationParameters(destAddr, destPort, destTTL);<br>
}<br> if (fRTCPSocket != NULL && !isSSM()) {<br> // Note: For SSM sessions, the dest address for RTCP was already set.<br>+ if (fRTCPInstance != NULL) {<br>+ Medium::close(fRTCPInstance); fRTCPInstance = NULL;<br>
+ }<br> Port destPort(serverPortNum+1);<br>- fRTCPSocket-><br>+ fRTCPSocket-> <br> changeDestinationParameters(destAddr, destPort, destTTL);<br>- }<br>-}<br>+ // Finally, create our RTCP instance. (It starts running automatically)<br>
+ if (fRTPSource != NULL) {<br>+ unsigned totSessionBandwidth = 500; // HACK - later get from SDP#####<br>+ fRTCPInstance = RTCPInstance::createNew(env(), fRTCPSocket,<br>+ totSessionBandwidth,<br>
+ (unsigned char const*)<br>+ fParent.CNAME(),<br>+ NULL /* we're a client */,<br>
+ fRTPSource);<br>+ if (fRTCPInstance == NULL) {<br>+ env().setResultMsg("Failed to create RTCP instance");<br>+ }<br>+ }<br>+ } <br>+} <br> <br>
double MediaSubsession::getNormalPlayTime(struct timeval const& presentationTime) {<br> // First, check whether our "RTPSource" object has already been synchronized using RTCP.<br>[root@devkrakora live-latest]# <br>
<br>
</div><br><br clear="all"><br>-- <br>Rob Krakora<br>Senior Software Engineer<br>MessageNet Systems<br>101 East Carmel Dr. Suite 105<br>Carmel, IN 46032<br>(317)566-1677 Ext. 206<br>(317)663-0808 Fax<br>