[Live-devel] RTSP H263+ streaming oddities.

Cristiano Belloni belloni at imavis.com
Thu Dec 6 09:23:12 PST 2007


Hi to everybody,

I tried to modify the testOnDemandRTSPServer.cpp source to stream H263+ 
video. First, I try to read the stream from a file.

In the future, I'd like to encode and stream on the fly.

The problem is, I simply added this code to the source file:

{
    char const* streamName = "H263ESVideoTest";
    char const* inputFileName = "video-H263-1998-1.3pg";

    ServerMediaSession* sms
      = ServerMediaSession::createNew(*env, streamName, streamName,
                      descriptionString);

    sms->addSubsession(H263plusVideoFileServerMediaSubsession
               ::createNew(*env, inputFileName, reuseFirstSource));

    rtspServer->addServerMediaSession(sms);

    announceStream(rtspServer, sms, streamName, inputFileName);
  }

mainly imitating the pre-existing code.

RTSP Server waits correctly on port 8554. When I try to play it either 
with VLC or openRTSP, the client-server communication goes like that:


----------------------

VLC media player 0.8.6c Janus
Sending request: OPTIONS rtsp://217.133.231.30:8554/H263ESVideoTest RTSP/1.0
CSeq: 1
User-Agent: VLC media player (LIVE555 Streaming Media v2007.02.20)


Received OPTIONS response: RTSP/1.0 200 OK
CSeq: 1
Date: Thu, Dec 06 2007 16:55:58 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE


Sending request: DESCRIBE rtsp://217.133.231.30:8554/H263ESVideoTest 
RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: VLC media player (LIVE555 Streaming Media v2007.02.20)


Received DESCRIBE response: RTSP/1.0 200 OK
CSeq: 2
Date: Thu, Dec 06 2007 16:55:58 GMT
Content-Base: rtsp://217.133.231.30:8554/H263ESVideoTest/
Content-Type: application/sdp
Content-Length: 369


Need to read 369 extra bytes
Read 369 extra bytes: v=0
o=- 1196960112744027 1 IN IP4 217.133.231.30
s=Session streamed by "testOnDemandRTSPServer"
i=H263ESVideoTest
t=0 0
a=tool:LIVE555 Streaming Media v2007.02.20
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Session streamed by "testOnDemandRTSPServer"
a=x-qt-text-inf:H263ESVideoTest
m=video 0 RTP/AVP 34
c=IN IP4 0.0.0.0
a=control:track1

[00000292] live555 demuxer error: Nothing to play for 
rtsp://217.133.231.30:8554/H263ESVideoTest
[00000290] main input error: no suitable access module for 
`rtsp://217.133.231.30:8554/H263ESVideoTest'
[00000281] main playlist: nothing to play
[00000281] main playlist: stopping playback

----------------------------------



It seems that the SDP misses the a=rtpmap:96 H263-1998/90000 line. It 
also yelds the strange m=video 0 RTP/AVP 34, as if it would send RTP 
contents on port 0.

After that, I tried to modify the testMPEG1or2VideoStreamer.cpp program, 
again simply substituting the Mpeg 1/2 sink with H263plusVideoRTPSink 
and the Mpeg 1/2 framer with H263plusVideoStreamFramer, and activating 
the RTSP  server defining IMPLEMENT_RTSP_SERVER.

It works, but with several problems:

1. Won't do RTP over TCP when requested (RTSP server returns with a 460 
and something code, complaining it's not supported). It only works with UDP.

2.  Port  is fixed to 8888 (it makes sense, since we define it at the 
beginning of the program)

3. In addiction of streaming on demand, it also streams multicast on 
239.255.42.42 (it also makes sense, but I don't know how to avoid it).

I think the correct solution is using the onDemand approach, but does 
someone know the reason of its strange behaviour (and how to crcumvent 
it, of course)?

Best regards,

Cristiano.

-- 
Belloni Cristiano


More information about the live-devel mailing list