无法使用 Live555 服务器进行流式传输 - 示例不起作用
最近我从他们的网站下载了 Live555 服务器源代码。我尝试编译并运行 testProgs
目录中的 testMPEG1or2AudioVideoStreamer.cpp
文件。我成功编译了整个项目,包括测试程序。然后我运行 testMPEG1or2AudioVideoStreamer
测试程序。我还在测试程序中定义的当前目录中放置了一个 test.mpg
文件。运行后我得到以下输出:
Play this stream using the URL "rtsp://192.168.2.22:5555/testStream"
Beginning streaming...
Beginning to read from file...
...done reading from file
Beginning to read from file...
...done reading from file
etc.,
然后我使用 VLC 媒体播放器复制并播放 URL rtsp://192.168.2.22:5555/testStream
,但 VLC 只是等待一段时间然后停止(与 Gnome 相同) MPlayer 也)。它不播放任何音频或视频。感谢任何帮助,因为如果没有使用 Live555 成功进行流式传输,我就无法继续。这是testMPEG1or2AudioVideoStreamer.cpp
的代码。你能告诉我我错过了什么吗...
/**********
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// Copyright (c) 1996-2010, Live Networks, Inc. All rights reserved
// A test program that reads a MPEG-1 or 2 Program Stream file,
// splits it into Audio and Video Elementary Streams,
// and streams both using RTP
// main program
#include "liveMedia.hh"
#include "BasicUsageEnvironment.hh"
#include "GroupsockHelper.hh"
UsageEnvironment* env;
char const* inputFileName = "test.mpg";
MPEG1or2Demux* mpegDemux;
FramedSource* audioSource;
FramedSource* videoSource;
RTPSink* audioSink;
RTPSink* videoSink;
void play(); // forward
// To stream using "source-specific multicast" (SSM), uncomment the following:
//#define USE_SSM 1
#ifdef USE_SSM
Boolean const isSSM = True;
#else
Boolean const isSSM = False;
#endif
// To set up an internal RTSP server, uncomment the following:
#define IMPLEMENT_RTSP_SERVER 1
// (Note that this RTSP server works for multicast only)
// To stream *only* MPEG "I" frames (e.g., to reduce network bandwidth),
// change the following "False" to "True":
Boolean iFramesOnly = False;
int main(int argc, char** argv) {
// Begin by setting up our usage environment:
TaskScheduler* scheduler = BasicTaskScheduler::createNew();
env = BasicUsageEnvironment::createNew(*scheduler);
// Create 'groupsocks' for RTP and RTCP:
char const* destinationAddressStr
#ifdef USE_SSM
= "192.168.1.255";
#else
= "192.168.1.255";
// Note: This is a multicast address. If you wish to stream using
// unicast instead, then replace this string with the unicast address
// of the (single) destination. (You may also need to make a similar
// change to the receiver program.)
#endif
const unsigned short rtpPortNumAudio = 6666;
const unsigned short rtcpPortNumAudio = rtpPortNumAudio+1;
const unsigned short rtpPortNumVideo = 8888;
const unsigned short rtcpPortNumVideo = rtpPortNumVideo+1;
const unsigned char ttl = 7; // low, in case routers don't admin scope
struct in_addr destinationAddress;
destinationAddress.s_addr = our_inet_addr(destinationAddressStr);
const Port rtpPortAudio(rtpPortNumAudio);
const Port rtcpPortAudio(rtcpPortNumAudio);
const Port rtpPortVideo(rtpPortNumVideo);
const Port rtcpPortVideo(rtcpPortNumVideo);
Groupsock rtpGroupsockAudio(*env, destinationAddress, rtpPortAudio, ttl);
Groupsock rtcpGroupsockAudio(*env, destinationAddress, rtcpPortAudio, ttl);
Groupsock rtpGroupsockVideo(*env, destinationAddress, rtpPortVideo, ttl);
Groupsock rtcpGroupsockVideo(*env, destinationAddress, rtcpPortVideo, ttl);
#ifdef USE_SSM
rtpGroupsockAudio.multicastSendOnly();
rtcpGroupsockAudio.multicastSendOnly();
rtpGroupsockVideo.multicastSendOnly();
rtcpGroupsockVideo.multicastSendOnly();
#endif
// Create a 'MPEG Audio RTP' sink from the RTP 'groupsock':
audioSink = MPEG1or2AudioRTPSink::createNew(*env, &rtpGroupsockAudio);
// Create (and start) a 'RTCP instance' for this RTP sink:
const unsigned estimatedSessionBandwidthAudio = 160; // in kbps; for RTCP b/w share
const unsigned maxCNAMElen = 100;
unsigned char CNAME[maxCNAMElen+1];
gethostname((char*)CNAME, maxCNAMElen);
CNAME[maxCNAMElen] = '\0'; // just in case
#ifdef IMPLEMENT_RTSP_SERVER
RTCPInstance* audioRTCP =
#endif
RTCPInstance::createNew(*env, &rtcpGroupsockAudio,
estimatedSessionBandwidthAudio, CNAME,
audioSink, NULL /* we're a server */, isSSM);
// Note: This starts RTCP running automatically
// Create a 'MPEG Video RTP' sink from the RTP 'groupsock':
videoSink = MPEG1or2VideoRTPSink::createNew(*env, &rtpGroupsockVideo);
// Create (and start) a 'RTCP instance' for this RTP sink:
const unsigned estimatedSessionBandwidthVideo = 4500; // in kbps; for RTCP b/w share
#ifdef IMPLEMENT_RTSP_SERVER
RTCPInstance* videoRTCP =
#endif
RTCPInstance::createNew(*env, &rtcpGroupsockVideo,
estimatedSessionBandwidthVideo, CNAME,
videoSink, NULL /* we're a server */, isSSM);
// Note: This starts RTCP running automatically
#ifdef IMPLEMENT_RTSP_SERVER
RTSPServer* rtspServer = RTSPServer::createNew(*env, 5555);
// Note that this (attempts to) start a server on the default RTSP server
// port: 554. To use a different port number, add it as an extra
// (optional) parameter to the "RTSPServer::createNew()" call above.
if (rtspServer == NULL) {
*env << "Failed to create RTSP server: " << env->getResultMsg() << "\n";
exit(1);
}
ServerMediaSession* sms
= ServerMediaSession::createNew(*env, "testStream", inputFileName,
"Session streamed by \"testMPEG1or2AudioVideoStreamer\"",
isSSM);
sms->addSubsession(PassiveServerMediaSubsession::createNew(*audioSink, audioRTCP));
sms->addSubsession(PassiveServerMediaSubsession::createNew(*videoSink, videoRTCP));
rtspServer->addServerMediaSession(sms);
char* url = rtspServer->rtspURL(sms);
*env << "Play this stream using the URL \"" << url << "\"\n";
delete[] url;
#endif
// Finally, start the streaming:
*env << "Beginning streaming...\n";
play();
env->taskScheduler().doEventLoop(); // does not return
return 0; // only to prevent compiler warning
}
void afterPlaying(void* clientData) {
// One of the sinks has ended playing.
// Check whether any of the sources have a pending read. If so,
// wait until its sink ends playing also:
if (audioSource->isCurrentlyAwaitingData()
|| videoSource->isCurrentlyAwaitingData()) return;
// Now that both sinks have ended, close both input sources,
// and start playing again:
*env << "...done reading from file\n";
audioSink->stopPlaying();
videoSink->stopPlaying();
// ensures that both are shut down
Medium::close(audioSource);
Medium::close(videoSource);
Medium::close(mpegDemux);
// Note: This also closes the input file that this source read from.
// Start playing once again:
play();
}
void play() {
// Open the input file as a 'byte-stream file source':
ByteStreamFileSource* fileSource
= ByteStreamFileSource::createNew(*env, inputFileName);
if (fileSource == NULL) {
*env << "Unable to open file \"" << inputFileName
<< "\" as a byte-stream file source\n";
exit(1);
}
// We must demultiplex Audio and Video Elementary Streams
// from the input source:
mpegDemux = MPEG1or2Demux::createNew(*env, fileSource);
FramedSource* audioES = mpegDemux->newAudioStream();
FramedSource* videoES = mpegDemux->newVideoStream();
// Create a framer for each Elementary Stream:
audioSource
= MPEG1or2AudioStreamFramer::createNew(*env, audioES);
videoSource
= MPEG1or2VideoStreamFramer::createNew(*env, videoES, iFramesOnly);
// Finally, start playing each sink.
*env << "Beginning to read from file...\n";
videoSink->startPlaying(*videoSource, afterPlaying, videoSink);
audioSink->startPlaying(*audioSource, afterPlaying, audioSink);
}
编辑1:openRTSP
输出
[jomit@jomoos live2]$ testProgs/openRTSP -o rtsp://192.168.2.22:5555/testStream
Sending request: OPTIONS rtsp://192.168.2.22:5555/testStream RTSP/1.0
CSeq: 1
User-Agent: testProgs/openRTSP (LIVE555 Streaming Media v2010.03.08)
Received OPTIONS response: RTSP/1.0 200 OK
CSeq: 1
Date: Wed, Nov 30 2011 08:30:23 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
RTSP "OPTIONS" request returned: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
编辑2:端口检查
我使用Zenmap扫描端口,它显示 5555 作为 TCP 端口并且处于打开状态。但它显示该应用程序为 freeciv,但我尚未在我的系统上安装该游戏。也许这是 Zenmap 的猜测。我的系统上运行的是 Fedora 16 和 gnome 3.2。
编辑3: VLC输出
[0x21fa840] main playlist debug: processing request item rtsp://192.168.1.222:5555/testStream node Playlist skip 0
[0x21fa840] main playlist debug: resyncing on rtsp://192.168.1.222:5555/testStream
[0x21fa840] main playlist debug: rtsp://192.168.1.222:5555/testStream is at 0
[0x21fa840] main playlist debug: starting new item
[0x21fa840] main playlist debug: creating new input thread
[0x7f1f88005410] main input debug: Creating an input for 'rtsp://192.168.1.222:5555/testStream'
[0x7f1f88005410] main input debug: thread (input) created at priority 10 (input/input.c:220)
[0x7f1f88005ec0] main input debug: TIMER input launching for 'rtsp://192.168.1.222:5555/testStream' : 15.307 ms - Total 15.307 ms / 1 intvls (Avg 15.307 ms)
[0x2227990] qt4 interface debug: IM: Setting an input
[0x7f1f88005410] main input debug: thread started
[0x7f1f88005410] main input debug: using timeshift granularity of 50 MiB
[0x7f1f88005410] main input debug: using timeshift path '/tmp'
[0x7f1f88005410] main input debug: `rtsp://192.168.1.222:5555/testStream' gives access `rtsp' demux `' path `192.168.1.222:5555/testStream'
[0x7f1f88005410] main input debug: creating demux: access='rtsp' demux='' path='192.168.1.222:5555/testStream'
[0x7f1f7c002860] main demux debug: looking for access_demux module: 1 candidate
Opening connection to 192.168.1.222, port 5555...
...remote connection opened
Sending request: OPTIONS rtsp://192.168.1.222:5555/testStream RTSP/1.0
CSeq: 2
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Received 137 new bytes of response data.
Received a complete OPTIONS response:
RTSP/1.0 200 OK
CSeq: 2
Date: Wed, Nov 30 2011 19:45:55 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
Sending request: DESCRIBE rtsp://192.168.1.222:5555/testStream RTSP/1.0
CSeq: 3
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Accept: application/sdp
Received 641 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 3
Date: Wed, Nov 30 2011 19:45:55 GMT
Content-Base: rtsp://192.168.1.222:5555/testStream/
Content-Type: application/sdp
Content-Length: 471
v=0
o=- 1322681211098021 1 IN IP4 192.168.1.222
s=Session streamed by "testMPEG1or2AudioVideoStreamer"
i=test.mpg
t=0 0
a=tool:LIVE555 Streaming Media v2010.03.08
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Session streamed by "testMPEG1or2AudioVideoStreamer"
a=x-qt-text-inf:test.mpg
m=audio 6666 RTP/AVP 14
c=IN IP4 192.168.1.255/7
b=AS:160
a=control:track1
m=video 8888 RTP/AVP 32
c=IN IP4 192.168.1.255/7
b=AS:4500
a=control:track2
[0x7f1f7c002860] live555 demux debug: RTP subsession 'audio/MPA'
Sending request: SETUP rtsp://192.168.1.222:5555/testStream/track1 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Transport: RTP/AVP;unicast;client_port=6666-6667
Received 182 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 4
Date: Wed, Nov 30 2011 19:45:55 GMT
Transport: RTP/AVP;multicast;destination=192.168.1.255;source=192.168.1.222;port=6666-6667;ttl=7
Session: 06AFB6E5
[0x7f1f88005410] main input debug: selecting program id=0
[0x7f1f7c002860] live555 demux debug: RTP subsession 'video/MPV'
Sending request: SETUP rtsp://192.168.1.222:5555/testStream/track2 RTSP/1.0
CSeq: 5
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Transport: RTP/AVP;unicast;client_port=8888-8889
Session: 06AFB6E5
Received 182 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 5
Date: Wed, Nov 30 2011 19:45:55 GMT
Transport: RTP/AVP;multicast;destination=192.168.1.255;source=192.168.1.222;port=8888-8889;ttl=7
Session: 06AFB6E5
[0x7f1f7c002860] live555 demux debug: setup start: 0.000000 stop:0.000000
Sending request: PLAY rtsp://192.168.1.222:5555/testStream/ RTSP/1.0
CSeq: 6
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Session: 06AFB6E5
Range: npt=0.000-
Received 268 new bytes of response data.
Received a complete PLAY response:
RTSP/1.0 200 OK
CSeq: 6
Date: Wed, Nov 30 2011 19:45:55 GMT
Range: npt=0.000-
Session: 06AFB6E5
RTP-Info: url=rtsp://192.168.1.222:5555/testStream/track1;seq=33348;rtptime=3573241747,url=rtsp://192.168.1.222:5555/testStream/track2;seq=12520;rtptime=2773558772
[0x7f1f7c002860] live555 demux debug: play start: 0.000000 stop:0.000000
[0x7f1f7c002860] main demux debug: using access_demux module "live555"
[0x7f1f7c002860] main demux debug: TIMER module_need() : 5.536 ms - Total 5.536 ms / 1 intvls (Avg 5.536 ms)
[0x7f1f7c00dca0] main decoder debug: looking for decoder module: 33 candidates
[0x7f1f7c00dca0] main decoder debug: using decoder module "mpeg_audio"
[0x7f1f7c00dca0] main decoder debug: TIMER module_need() : 0.519 ms - Total 0.519 ms / 1 intvls (Avg 0.519 ms)
[0x7f1f7c00dca0] main decoder debug: thread (decoder) created at priority 5 (input/decoder.c:301)
[0x7f1f7c00dca0] main decoder debug: thread started
[0x7f1f7c00e5f0] main decoder debug: looking for decoder module: 33 candidates
[0x7f1f7c00e5f0] avcodec decoder debug: libavcodec already initialized
[0x7f1f7c00e5f0] avcodec decoder debug: trying to use direct rendering
[0x7f1f7c00e5f0] avcodec decoder debug: ffmpeg codec (MPEG-1/2 Video) started
[0x7f1f7c00e5f0] main decoder debug: using decoder module "avcodec"
[0x7f1f7c00e5f0] main decoder debug: TIMER module_need() : 1.561 ms - Total 1.561 ms / 1 intvls (Avg 1.561 ms)
[0x7f1f7c006b90] main packetizer debug: looking for packetizer module: 21 candidates
[0x7f1f7c006b90] main packetizer debug: using packetizer module "packetizer_mpegvideo"
[0x7f1f7c006b90] main packetizer debug: TIMER module_need() : 0.288 ms - Total 0.288 ms / 1 intvls (Avg 0.288 ms)
[0x7f1f7c00e5f0] main decoder debug: thread (decoder) created at priority 0 (input/decoder.c:301)
[0x7f1f7c00e5f0] main decoder debug: thread started
[0x7f1f7c008250] main demux meta debug: looking for meta reader module: 2 candidates
[0x7f1f7c008250] lua demux meta debug: Trying Lua scripts in /home/jomit/.local/share/vlc/lua/meta/reader
[0x7f1f7c008250] lua demux meta debug: Trying Lua scripts in /usr/lib64/vlc/lua/meta/reader
[0x7f1f7c008250] lua demux meta debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/reader/filename.luac
[0x7f1f7c008250] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[0x7f1f7c008250] main demux meta debug: no meta reader module matching "any" could be loaded
[0x7f1f7c008250] main demux meta debug: TIMER module_need() : 1.093 ms - Total 1.093 ms / 1 intvls (Avg 1.093 ms)
[0x7f1f88005410] main input debug: `rtsp://192.168.1.222:5555/testStream' successfully opened
[0x7f1f7c002860] live555 demux warning: no data received in 10s. Switching to TCP
Sending request: TEARDOWN rtsp://192.168.1.222:5555/testStream/ RTSP/1.0
CSeq: 7
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Session: 06AFB6E5
[0x7f1f7c00dca0] main decoder debug: removing module "mpeg_audio"
[0x7f1f7c00dca0] main decoder debug: killing decoder fourcc `mpga', 0 PES in FIFO
[0x7f1f7c00e5f0] avcodec decoder debug: ffmpeg codec (MPEG-1/2 Video) stopped
[0x7f1f7c00e5f0] main decoder debug: removing module "avcodec"
[0x7f1f7c00e5f0] main decoder debug: killing decoder fourcc `mpgv', 0 PES in FIFO
[0x7f1f7c006b90] main packetizer debug: removing module "packetizer_mpegvideo"
[0x7f1f88005410] main input debug: Program doesn't contain anymore ES
Opening connection to 192.168.1.222, port 5555...
...remote connection opened
Sending request: OPTIONS rtsp://192.168.1.222:5555/testStream RTSP/1.0
CSeq: 2
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Received 137 new bytes of response data.
Received a complete OPTIONS response:
RTSP/1.0 200 OK
CSeq: 2
Date: Wed, Nov 30 2011 19:46:05 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
Sending request: DESCRIBE rtsp://192.168.1.222:5555/testStream RTSP/1.0
CSeq: 3
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Accept: application/sdp
Received 641 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 3
Date: Wed, Nov 30 2011 19:46:05 GMT
Content-Base: rtsp://192.168.1.222:5555/testStream/
Content-Type: application/sdp
Content-Length: 471
v=0
o=- 1322681211098021 1 IN IP4 192.168.1.222
s=Session streamed by "testMPEG1or2AudioVideoStreamer"
i=test.mpg
t=0 0
a=tool:LIVE555 Streaming Media v2010.03.08
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Session streamed by "testMPEG1or2AudioVideoStreamer"
a=x-qt-text-inf:test.mpg
m=audio 6666 RTP/AVP 14
c=IN IP4 192.168.1.255/7
b=AS:160
a=control:track1
m=video 8888 RTP/AVP 32
c=IN IP4 192.168.1.255/7
b=AS:4500
a=control:track2
[0x7f1f7c002860] live555 demux debug: RTP subsession 'audio/MPA'
Sending request: SETUP rtsp://192.168.1.222:5555/testStream/track1 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Received 84 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 461 Unsupported Transport
CSeq: 4
Date: Wed, Nov 30 2011 19:46:05 GMT
Sending request: SETUP rtsp://192.168.1.222:5555/testStream/track1 RTSP/1.0
CSeq: 5
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Transport: RTP/AVP;unicast;client_port=6666-6667
[0x7f1f7c002860] live555 demux error: SETUP of'audio/MPA' failed 461 Unsupported Transport
[0x7f1f7c002860] live555 demux debug: RTP subsession 'video/MPV'
Opening connection to 192.168.1.222, port 5555...
...remote connection opened
Sending request: SETUP rtsp://192.168.1.222:5555/testStream/track2 RTSP/1.0
CSeq: 6
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Transport: RTP/AVP/TCP;unicast;interleaved=2-3
Received 84 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 461 Unsupported Transport
CSeq: 6
Date: Wed, Nov 30 2011 19:46:05 GMT
Sending request: SETUP rtsp://192.168.1.222:5555/testStream/track2 RTSP/1.0
CSeq: 7
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Transport: RTP/AVP;unicast;client_port=8888-8889
[0x7f1f7c002860] live555 demux error: SETUP of'video/MPV' failed RTSP response was truncated. Increase "RTSPClient::responseBufferSize"
[0x7f1f7c002860] live555 demux debug: setup start: 0.000000 stop:0.000000
[0x7f1f7c002860] live555 demux error: Nothing to play for rtsp://192.168.1.222:5555/testStream
[0x7f1f7c002860] live555 demux error: TCP rollover failed, aborting
[0x7f1f88005410] main input debug: EOF reached
[0x21fa840] main playlist debug: finished input
Opening connection to 192.168.1.222, port 5555...
[0x7f1f7c002860] main demux debug: removing module "live555"
[0x7f1f88005410] main input debug: thread ended
[0x21fa840] main playlist debug: dead input
[0x21fa840] main playlist debug: changing item without a request (current 0/1)
[0x21fa840] main playlist debug: nothing to play
[0x2227990] qt4 interface debug: IM: Deleting the input
一切看起来都正常,除了以下两个错误:
[0x7f1f7c002860] live555 demux error: SETUP of'audio/MPA' failed 461 Unsupported Transport
和
[0x7f1f7c002860] live555 demux error: SETUP of'video/MPV' failed RTSP response was truncated. Increase "RTSPClient::responseBufferSize"
[0x7f1f7c002860] live555 demux debug: setup start: 0.000000 stop:0.000000
[0x7f1f7c002860] live555 demux error: Nothing to play for rtsp://192.168.1.222:5555/testStream
[0x7f1f7c002860] live555 demux error: TCP rollover failed, aborting
Recently I downloaded Live555 server source code from their site. I tried to compile and run testMPEG1or2AudioVideoStreamer.cpp
file in the testProgs
directory. I compiled the whole project including the test programs successfully. Then I run the testMPEG1or2AudioVideoStreamer
test program. I also placed a test.mpg
file in the current directory as defined in the test program. After running I got the following output:
Play this stream using the URL "rtsp://192.168.2.22:5555/testStream"
Beginning streaming...
Beginning to read from file...
...done reading from file
Beginning to read from file...
...done reading from file
etc.,
Then I copy and play the URL rtsp://192.168.2.22:5555/testStream
using VLC media player, but VLC just wait sometime and then stop (same with Gnome MPlayer also). It does not play any audio or video. Any help is appreciated as I cannot go forward without successfully streaming using Live555. Here is the code of testMPEG1or2AudioVideoStreamer.cpp
. Can you tell me what am I missing...
/**********
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// Copyright (c) 1996-2010, Live Networks, Inc. All rights reserved
// A test program that reads a MPEG-1 or 2 Program Stream file,
// splits it into Audio and Video Elementary Streams,
// and streams both using RTP
// main program
#include "liveMedia.hh"
#include "BasicUsageEnvironment.hh"
#include "GroupsockHelper.hh"
UsageEnvironment* env;
char const* inputFileName = "test.mpg";
MPEG1or2Demux* mpegDemux;
FramedSource* audioSource;
FramedSource* videoSource;
RTPSink* audioSink;
RTPSink* videoSink;
void play(); // forward
// To stream using "source-specific multicast" (SSM), uncomment the following:
//#define USE_SSM 1
#ifdef USE_SSM
Boolean const isSSM = True;
#else
Boolean const isSSM = False;
#endif
// To set up an internal RTSP server, uncomment the following:
#define IMPLEMENT_RTSP_SERVER 1
// (Note that this RTSP server works for multicast only)
// To stream *only* MPEG "I" frames (e.g., to reduce network bandwidth),
// change the following "False" to "True":
Boolean iFramesOnly = False;
int main(int argc, char** argv) {
// Begin by setting up our usage environment:
TaskScheduler* scheduler = BasicTaskScheduler::createNew();
env = BasicUsageEnvironment::createNew(*scheduler);
// Create 'groupsocks' for RTP and RTCP:
char const* destinationAddressStr
#ifdef USE_SSM
= "192.168.1.255";
#else
= "192.168.1.255";
// Note: This is a multicast address. If you wish to stream using
// unicast instead, then replace this string with the unicast address
// of the (single) destination. (You may also need to make a similar
// change to the receiver program.)
#endif
const unsigned short rtpPortNumAudio = 6666;
const unsigned short rtcpPortNumAudio = rtpPortNumAudio+1;
const unsigned short rtpPortNumVideo = 8888;
const unsigned short rtcpPortNumVideo = rtpPortNumVideo+1;
const unsigned char ttl = 7; // low, in case routers don't admin scope
struct in_addr destinationAddress;
destinationAddress.s_addr = our_inet_addr(destinationAddressStr);
const Port rtpPortAudio(rtpPortNumAudio);
const Port rtcpPortAudio(rtcpPortNumAudio);
const Port rtpPortVideo(rtpPortNumVideo);
const Port rtcpPortVideo(rtcpPortNumVideo);
Groupsock rtpGroupsockAudio(*env, destinationAddress, rtpPortAudio, ttl);
Groupsock rtcpGroupsockAudio(*env, destinationAddress, rtcpPortAudio, ttl);
Groupsock rtpGroupsockVideo(*env, destinationAddress, rtpPortVideo, ttl);
Groupsock rtcpGroupsockVideo(*env, destinationAddress, rtcpPortVideo, ttl);
#ifdef USE_SSM
rtpGroupsockAudio.multicastSendOnly();
rtcpGroupsockAudio.multicastSendOnly();
rtpGroupsockVideo.multicastSendOnly();
rtcpGroupsockVideo.multicastSendOnly();
#endif
// Create a 'MPEG Audio RTP' sink from the RTP 'groupsock':
audioSink = MPEG1or2AudioRTPSink::createNew(*env, &rtpGroupsockAudio);
// Create (and start) a 'RTCP instance' for this RTP sink:
const unsigned estimatedSessionBandwidthAudio = 160; // in kbps; for RTCP b/w share
const unsigned maxCNAMElen = 100;
unsigned char CNAME[maxCNAMElen+1];
gethostname((char*)CNAME, maxCNAMElen);
CNAME[maxCNAMElen] = '\0'; // just in case
#ifdef IMPLEMENT_RTSP_SERVER
RTCPInstance* audioRTCP =
#endif
RTCPInstance::createNew(*env, &rtcpGroupsockAudio,
estimatedSessionBandwidthAudio, CNAME,
audioSink, NULL /* we're a server */, isSSM);
// Note: This starts RTCP running automatically
// Create a 'MPEG Video RTP' sink from the RTP 'groupsock':
videoSink = MPEG1or2VideoRTPSink::createNew(*env, &rtpGroupsockVideo);
// Create (and start) a 'RTCP instance' for this RTP sink:
const unsigned estimatedSessionBandwidthVideo = 4500; // in kbps; for RTCP b/w share
#ifdef IMPLEMENT_RTSP_SERVER
RTCPInstance* videoRTCP =
#endif
RTCPInstance::createNew(*env, &rtcpGroupsockVideo,
estimatedSessionBandwidthVideo, CNAME,
videoSink, NULL /* we're a server */, isSSM);
// Note: This starts RTCP running automatically
#ifdef IMPLEMENT_RTSP_SERVER
RTSPServer* rtspServer = RTSPServer::createNew(*env, 5555);
// Note that this (attempts to) start a server on the default RTSP server
// port: 554. To use a different port number, add it as an extra
// (optional) parameter to the "RTSPServer::createNew()" call above.
if (rtspServer == NULL) {
*env << "Failed to create RTSP server: " << env->getResultMsg() << "\n";
exit(1);
}
ServerMediaSession* sms
= ServerMediaSession::createNew(*env, "testStream", inputFileName,
"Session streamed by \"testMPEG1or2AudioVideoStreamer\"",
isSSM);
sms->addSubsession(PassiveServerMediaSubsession::createNew(*audioSink, audioRTCP));
sms->addSubsession(PassiveServerMediaSubsession::createNew(*videoSink, videoRTCP));
rtspServer->addServerMediaSession(sms);
char* url = rtspServer->rtspURL(sms);
*env << "Play this stream using the URL \"" << url << "\"\n";
delete[] url;
#endif
// Finally, start the streaming:
*env << "Beginning streaming...\n";
play();
env->taskScheduler().doEventLoop(); // does not return
return 0; // only to prevent compiler warning
}
void afterPlaying(void* clientData) {
// One of the sinks has ended playing.
// Check whether any of the sources have a pending read. If so,
// wait until its sink ends playing also:
if (audioSource->isCurrentlyAwaitingData()
|| videoSource->isCurrentlyAwaitingData()) return;
// Now that both sinks have ended, close both input sources,
// and start playing again:
*env << "...done reading from file\n";
audioSink->stopPlaying();
videoSink->stopPlaying();
// ensures that both are shut down
Medium::close(audioSource);
Medium::close(videoSource);
Medium::close(mpegDemux);
// Note: This also closes the input file that this source read from.
// Start playing once again:
play();
}
void play() {
// Open the input file as a 'byte-stream file source':
ByteStreamFileSource* fileSource
= ByteStreamFileSource::createNew(*env, inputFileName);
if (fileSource == NULL) {
*env << "Unable to open file \"" << inputFileName
<< "\" as a byte-stream file source\n";
exit(1);
}
// We must demultiplex Audio and Video Elementary Streams
// from the input source:
mpegDemux = MPEG1or2Demux::createNew(*env, fileSource);
FramedSource* audioES = mpegDemux->newAudioStream();
FramedSource* videoES = mpegDemux->newVideoStream();
// Create a framer for each Elementary Stream:
audioSource
= MPEG1or2AudioStreamFramer::createNew(*env, audioES);
videoSource
= MPEG1or2VideoStreamFramer::createNew(*env, videoES, iFramesOnly);
// Finally, start playing each sink.
*env << "Beginning to read from file...\n";
videoSink->startPlaying(*videoSource, afterPlaying, videoSink);
audioSink->startPlaying(*audioSource, afterPlaying, audioSink);
}
EDIT 1: openRTSP
output
[jomit@jomoos live2]$ testProgs/openRTSP -o rtsp://192.168.2.22:5555/testStream
Sending request: OPTIONS rtsp://192.168.2.22:5555/testStream RTSP/1.0
CSeq: 1
User-Agent: testProgs/openRTSP (LIVE555 Streaming Media v2010.03.08)
Received OPTIONS response: RTSP/1.0 200 OK
CSeq: 1
Date: Wed, Nov 30 2011 08:30:23 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
RTSP "OPTIONS" request returned: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
EDIT 2: port check
I used Zenmap to scan the ports, and it shows 5555 as a tcp port and as open. But it shows the application as freeciv, but I haven't installed that game on my system. May be it is a guess by Zenmap. I am running Fedora 16 with gnome 3.2 on my system.
EDIT 3: VLC output
[0x21fa840] main playlist debug: processing request item rtsp://192.168.1.222:5555/testStream node Playlist skip 0
[0x21fa840] main playlist debug: resyncing on rtsp://192.168.1.222:5555/testStream
[0x21fa840] main playlist debug: rtsp://192.168.1.222:5555/testStream is at 0
[0x21fa840] main playlist debug: starting new item
[0x21fa840] main playlist debug: creating new input thread
[0x7f1f88005410] main input debug: Creating an input for 'rtsp://192.168.1.222:5555/testStream'
[0x7f1f88005410] main input debug: thread (input) created at priority 10 (input/input.c:220)
[0x7f1f88005ec0] main input debug: TIMER input launching for 'rtsp://192.168.1.222:5555/testStream' : 15.307 ms - Total 15.307 ms / 1 intvls (Avg 15.307 ms)
[0x2227990] qt4 interface debug: IM: Setting an input
[0x7f1f88005410] main input debug: thread started
[0x7f1f88005410] main input debug: using timeshift granularity of 50 MiB
[0x7f1f88005410] main input debug: using timeshift path '/tmp'
[0x7f1f88005410] main input debug: `rtsp://192.168.1.222:5555/testStream' gives access `rtsp' demux `' path `192.168.1.222:5555/testStream'
[0x7f1f88005410] main input debug: creating demux: access='rtsp' demux='' path='192.168.1.222:5555/testStream'
[0x7f1f7c002860] main demux debug: looking for access_demux module: 1 candidate
Opening connection to 192.168.1.222, port 5555...
...remote connection opened
Sending request: OPTIONS rtsp://192.168.1.222:5555/testStream RTSP/1.0
CSeq: 2
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Received 137 new bytes of response data.
Received a complete OPTIONS response:
RTSP/1.0 200 OK
CSeq: 2
Date: Wed, Nov 30 2011 19:45:55 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
Sending request: DESCRIBE rtsp://192.168.1.222:5555/testStream RTSP/1.0
CSeq: 3
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Accept: application/sdp
Received 641 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 3
Date: Wed, Nov 30 2011 19:45:55 GMT
Content-Base: rtsp://192.168.1.222:5555/testStream/
Content-Type: application/sdp
Content-Length: 471
v=0
o=- 1322681211098021 1 IN IP4 192.168.1.222
s=Session streamed by "testMPEG1or2AudioVideoStreamer"
i=test.mpg
t=0 0
a=tool:LIVE555 Streaming Media v2010.03.08
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Session streamed by "testMPEG1or2AudioVideoStreamer"
a=x-qt-text-inf:test.mpg
m=audio 6666 RTP/AVP 14
c=IN IP4 192.168.1.255/7
b=AS:160
a=control:track1
m=video 8888 RTP/AVP 32
c=IN IP4 192.168.1.255/7
b=AS:4500
a=control:track2
[0x7f1f7c002860] live555 demux debug: RTP subsession 'audio/MPA'
Sending request: SETUP rtsp://192.168.1.222:5555/testStream/track1 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Transport: RTP/AVP;unicast;client_port=6666-6667
Received 182 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 4
Date: Wed, Nov 30 2011 19:45:55 GMT
Transport: RTP/AVP;multicast;destination=192.168.1.255;source=192.168.1.222;port=6666-6667;ttl=7
Session: 06AFB6E5
[0x7f1f88005410] main input debug: selecting program id=0
[0x7f1f7c002860] live555 demux debug: RTP subsession 'video/MPV'
Sending request: SETUP rtsp://192.168.1.222:5555/testStream/track2 RTSP/1.0
CSeq: 5
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Transport: RTP/AVP;unicast;client_port=8888-8889
Session: 06AFB6E5
Received 182 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 5
Date: Wed, Nov 30 2011 19:45:55 GMT
Transport: RTP/AVP;multicast;destination=192.168.1.255;source=192.168.1.222;port=8888-8889;ttl=7
Session: 06AFB6E5
[0x7f1f7c002860] live555 demux debug: setup start: 0.000000 stop:0.000000
Sending request: PLAY rtsp://192.168.1.222:5555/testStream/ RTSP/1.0
CSeq: 6
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Session: 06AFB6E5
Range: npt=0.000-
Received 268 new bytes of response data.
Received a complete PLAY response:
RTSP/1.0 200 OK
CSeq: 6
Date: Wed, Nov 30 2011 19:45:55 GMT
Range: npt=0.000-
Session: 06AFB6E5
RTP-Info: url=rtsp://192.168.1.222:5555/testStream/track1;seq=33348;rtptime=3573241747,url=rtsp://192.168.1.222:5555/testStream/track2;seq=12520;rtptime=2773558772
[0x7f1f7c002860] live555 demux debug: play start: 0.000000 stop:0.000000
[0x7f1f7c002860] main demux debug: using access_demux module "live555"
[0x7f1f7c002860] main demux debug: TIMER module_need() : 5.536 ms - Total 5.536 ms / 1 intvls (Avg 5.536 ms)
[0x7f1f7c00dca0] main decoder debug: looking for decoder module: 33 candidates
[0x7f1f7c00dca0] main decoder debug: using decoder module "mpeg_audio"
[0x7f1f7c00dca0] main decoder debug: TIMER module_need() : 0.519 ms - Total 0.519 ms / 1 intvls (Avg 0.519 ms)
[0x7f1f7c00dca0] main decoder debug: thread (decoder) created at priority 5 (input/decoder.c:301)
[0x7f1f7c00dca0] main decoder debug: thread started
[0x7f1f7c00e5f0] main decoder debug: looking for decoder module: 33 candidates
[0x7f1f7c00e5f0] avcodec decoder debug: libavcodec already initialized
[0x7f1f7c00e5f0] avcodec decoder debug: trying to use direct rendering
[0x7f1f7c00e5f0] avcodec decoder debug: ffmpeg codec (MPEG-1/2 Video) started
[0x7f1f7c00e5f0] main decoder debug: using decoder module "avcodec"
[0x7f1f7c00e5f0] main decoder debug: TIMER module_need() : 1.561 ms - Total 1.561 ms / 1 intvls (Avg 1.561 ms)
[0x7f1f7c006b90] main packetizer debug: looking for packetizer module: 21 candidates
[0x7f1f7c006b90] main packetizer debug: using packetizer module "packetizer_mpegvideo"
[0x7f1f7c006b90] main packetizer debug: TIMER module_need() : 0.288 ms - Total 0.288 ms / 1 intvls (Avg 0.288 ms)
[0x7f1f7c00e5f0] main decoder debug: thread (decoder) created at priority 0 (input/decoder.c:301)
[0x7f1f7c00e5f0] main decoder debug: thread started
[0x7f1f7c008250] main demux meta debug: looking for meta reader module: 2 candidates
[0x7f1f7c008250] lua demux meta debug: Trying Lua scripts in /home/jomit/.local/share/vlc/lua/meta/reader
[0x7f1f7c008250] lua demux meta debug: Trying Lua scripts in /usr/lib64/vlc/lua/meta/reader
[0x7f1f7c008250] lua demux meta debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/reader/filename.luac
[0x7f1f7c008250] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[0x7f1f7c008250] main demux meta debug: no meta reader module matching "any" could be loaded
[0x7f1f7c008250] main demux meta debug: TIMER module_need() : 1.093 ms - Total 1.093 ms / 1 intvls (Avg 1.093 ms)
[0x7f1f88005410] main input debug: `rtsp://192.168.1.222:5555/testStream' successfully opened
[0x7f1f7c002860] live555 demux warning: no data received in 10s. Switching to TCP
Sending request: TEARDOWN rtsp://192.168.1.222:5555/testStream/ RTSP/1.0
CSeq: 7
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Session: 06AFB6E5
[0x7f1f7c00dca0] main decoder debug: removing module "mpeg_audio"
[0x7f1f7c00dca0] main decoder debug: killing decoder fourcc `mpga', 0 PES in FIFO
[0x7f1f7c00e5f0] avcodec decoder debug: ffmpeg codec (MPEG-1/2 Video) stopped
[0x7f1f7c00e5f0] main decoder debug: removing module "avcodec"
[0x7f1f7c00e5f0] main decoder debug: killing decoder fourcc `mpgv', 0 PES in FIFO
[0x7f1f7c006b90] main packetizer debug: removing module "packetizer_mpegvideo"
[0x7f1f88005410] main input debug: Program doesn't contain anymore ES
Opening connection to 192.168.1.222, port 5555...
...remote connection opened
Sending request: OPTIONS rtsp://192.168.1.222:5555/testStream RTSP/1.0
CSeq: 2
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Received 137 new bytes of response data.
Received a complete OPTIONS response:
RTSP/1.0 200 OK
CSeq: 2
Date: Wed, Nov 30 2011 19:46:05 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, SET_PARAMETER
Sending request: DESCRIBE rtsp://192.168.1.222:5555/testStream RTSP/1.0
CSeq: 3
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Accept: application/sdp
Received 641 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 3
Date: Wed, Nov 30 2011 19:46:05 GMT
Content-Base: rtsp://192.168.1.222:5555/testStream/
Content-Type: application/sdp
Content-Length: 471
v=0
o=- 1322681211098021 1 IN IP4 192.168.1.222
s=Session streamed by "testMPEG1or2AudioVideoStreamer"
i=test.mpg
t=0 0
a=tool:LIVE555 Streaming Media v2010.03.08
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Session streamed by "testMPEG1or2AudioVideoStreamer"
a=x-qt-text-inf:test.mpg
m=audio 6666 RTP/AVP 14
c=IN IP4 192.168.1.255/7
b=AS:160
a=control:track1
m=video 8888 RTP/AVP 32
c=IN IP4 192.168.1.255/7
b=AS:4500
a=control:track2
[0x7f1f7c002860] live555 demux debug: RTP subsession 'audio/MPA'
Sending request: SETUP rtsp://192.168.1.222:5555/testStream/track1 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Received 84 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 461 Unsupported Transport
CSeq: 4
Date: Wed, Nov 30 2011 19:46:05 GMT
Sending request: SETUP rtsp://192.168.1.222:5555/testStream/track1 RTSP/1.0
CSeq: 5
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Transport: RTP/AVP;unicast;client_port=6666-6667
[0x7f1f7c002860] live555 demux error: SETUP of'audio/MPA' failed 461 Unsupported Transport
[0x7f1f7c002860] live555 demux debug: RTP subsession 'video/MPV'
Opening connection to 192.168.1.222, port 5555...
...remote connection opened
Sending request: SETUP rtsp://192.168.1.222:5555/testStream/track2 RTSP/1.0
CSeq: 6
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Transport: RTP/AVP/TCP;unicast;interleaved=2-3
Received 84 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 461 Unsupported Transport
CSeq: 6
Date: Wed, Nov 30 2011 19:46:05 GMT
Sending request: SETUP rtsp://192.168.1.222:5555/testStream/track2 RTSP/1.0
CSeq: 7
User-Agent: LibVLC/1.1.12 (LIVE555 Streaming Media v2011.09.02)
Transport: RTP/AVP;unicast;client_port=8888-8889
[0x7f1f7c002860] live555 demux error: SETUP of'video/MPV' failed RTSP response was truncated. Increase "RTSPClient::responseBufferSize"
[0x7f1f7c002860] live555 demux debug: setup start: 0.000000 stop:0.000000
[0x7f1f7c002860] live555 demux error: Nothing to play for rtsp://192.168.1.222:5555/testStream
[0x7f1f7c002860] live555 demux error: TCP rollover failed, aborting
[0x7f1f88005410] main input debug: EOF reached
[0x21fa840] main playlist debug: finished input
Opening connection to 192.168.1.222, port 5555...
[0x7f1f7c002860] main demux debug: removing module "live555"
[0x7f1f88005410] main input debug: thread ended
[0x21fa840] main playlist debug: dead input
[0x21fa840] main playlist debug: changing item without a request (current 0/1)
[0x21fa840] main playlist debug: nothing to play
[0x2227990] qt4 interface debug: IM: Deleting the input
Everything seems OK, except with the following two errors:
[0x7f1f7c002860] live555 demux error: SETUP of'audio/MPA' failed 461 Unsupported Transport
and
[0x7f1f7c002860] live555 demux error: SETUP of'video/MPV' failed RTSP response was truncated. Increase "RTSPClient::responseBufferSize"
[0x7f1f7c002860] live555 demux debug: setup start: 0.000000 stop:0.000000
[0x7f1f7c002860] live555 demux error: Nothing to play for rtsp://192.168.1.222:5555/testStream
[0x7f1f7c002860] live555 demux error: TCP rollover failed, aborting
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我怀疑这可能与使用非标准端口号有关,但我可能是错的。 IANA 分配的 RTSP 端口是 554,8554 作为辅助 IIRC。
看起来您修改了服务器上的 live555 代码以改用 5555。但是您不知道VLC对live555的使用是否支持使用非标准RTSP端口号。我想你可以在 VLC 代码中查找这一点。
您可以尝试的事情:
这些步骤将帮助您缩小问题的范围。
编辑:
从 RTSP 通信中,您可以看到 VLC 正在尝试创建单播会话,服务器使用多播传输地址进行响应。然后,VLC 播放流,在 10 秒内没有接收到任何数据,然后尝试启动基于 RTSP 的交错 RTP 会话,服务器再次使用多播地址进行响应,因此 RTSP 服务器会使用 461 进行响应。
据 live555 报道:
I suspect this might have something to do with the use of a non-standard port number, but I may be wrong. The IANA-assigned RTSP port is 554, and 8554 as a secondary IIRC.
It looks like you modifed the live555 code on the server to use 5555 instead. However you don't know if VLC's usage of live555 supports using non-standard RTSP port numbers. I suppose you could look this up in the VLC code.
Things you can try:
These steps will allow you to narrow down where the problem is.
Edit:
From the RTSP comms you can see that VLC is trying to create a unicast session, the server responds with a multicast transport address. VLC then plays the stream, receives no data for 10s and then attempts to start an interleaved RTP over RTSP session to which the server again responds with a multicast address and hence the RTSP server responds with 461.
According to live555:
您是否有多个网络接口?流量可能通过错误的接口。您可以使用 Wireshark 或其他数据包嗅探器来检查。
如果是这种情况,此邮件线程可能会有所帮助:
http://lists.live555.com/pipermail/live-devel /2007年5月/006864.html
Do you have more than one network interface? Traffic may be going through the wrong interface. You could use Wireshark or other packet sniffer to check that.
Should that be the case, this mail thread may be helpful:
http://lists.live555.com/pipermail/live-devel/2007-May/006864.html
就我而言,禁用虚拟机(本例中为 virtualbox)网络适配器是有效的。
In my case disabling virtual machine (virtualbox in this case) network adapters worked.