Ask a questionAsk a question
 

QuestionRTSP

  • Monday, September 21, 2009 12:40 PMnikname1 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi everyone! I try to create RTSP Server. My application consist from two modules: one for creating

    socket (port 554 and listining it) and another one for handling queries from Client (Windows Media

    Player) and preparing proper answers. But Client does not receive video stream, although communication

    between Client and Server take place. My actions:
        1. I create graph for streaming videofile on senders side over RTP using MainConcept SDK. The

    Network Renderer settings:
     - Streaming Protocol       RTP over UDP;
     - Streaming Port           1100;
     - Maximum Transfer Unit    15000;
     - Use RTCP                 Off;
     - Destination Address      192.168.0.9;   

        2. Run graph and save SDP data in file. So my file containe information:
    v=0
    o=Creator_Name 104075647539117 20216411084770 IN IP4 192.168.126.1
    s=MainConcept "Network Renderer"
    i=Mainconcept streaming session
    e=username@mainconept.ru
    p=+1(1234)567-890
    c=IN IP4 12.168.0.9/64
    b=AS:4000
    a=range:npt=0-321.80244440000001
    m=video 1100 RTP/AVP 33
    a=rtpmap:33 MP2T/90000
    a=control:trackID=1

        3. Run RTSP Server and start listining port 554

        4. Start Client (Windows Media Player / VLC)

        5. Catch query from my Client and Server send answers on it. Here the list of communication:
    Client ==> Server:
    ========================================
    OPTIONS * RTSP/1.0
    CSeq: 0
    User-Agent: Mainconcept RTSP client (www.mainconcept.com v2007.06.05)
    ========================================
    Server ==> Client
    ========================================
    RTSP/1.0 200 OK
    CSeq: 0
    Server: Mainconcept RTSP Server ver 1.0
    Public: SETUP, TEARDOWN, PLAY, PAUSE, DESCRIBE, OPTIONS
    ========================================
    Client ==> Server:
    ========================================
    DESCRIBE rtsp://192.168.0.9:1100/01.mpg RTSP/1.0
    CSeq: 1
    Accept: application/rtsl, application/mheg, application/x-rtsp-mh, application/sdp
    User-Agent: Mainconcept RTSP client (www.mainconcept.com v2007.06.05)

        6. For creation answer on request DESCRIBE from Client use SDP data saved in file (see Item 2).

        7. Client send to Server in SETUP request: client_port=1024-1025

        8. Then Server send such answer:
    ========================================
    Server ==> Client
    ========================================
    RTSP/1.0 200 OK
    CSeq: 2
    Server: Mainconcept RTSP Server ver 1.0
    Session: 103616086036597
    Transport:

    RTP/AVP/UDP;unicast;source=192.168.0.9;client_port=1024-1025;server_port=1100-1101;ssrc=4C749EDB
    Allow: SETUP, TEARDOWN, PLAY, PAUSE, DESCRIBE, OPTIONS, GET_PARAMETER

        Here parameters Session, ssrc randomly chosen but server_port=1100 because Network Renderer on my

    graph has streaming port 1100 (see item 1)

        9. Then:

    ========================================
    Client ==> Server:
    ========================================
    PLAY rtsp://192.168.0.9:1100/01.mpg RTSP/1.0
    CSeq: 3
    Scale: 1.
    Range: npt=0.00000-
    Session: 103616086036597
    User-Agent: Mainconcept RTSP client (www.mainconcept.com v2007.06.05)

        and my Server answer:

    ========================================
    Server ==> Client
    ========================================
    RTSP/1.0 200 OK
    CSeq: 3
    Server: Mainconcept RTSP Server ver 1.0
    Session: 103616086036597
    Scale: 1.000000
    Range: npt=0.00000-
    RTP-Info: url=trackID=1

        10. After that I have some time gap (pause)... and then Client start send queries from the very

    beginning. Client determine the lenght of the video file, but the video does not run.

        I've tried configure Network Renderer on different streaming ports but it does not work!  May be I

    need do someting with RTP stream?
        Please help me, may be I do something wrong?