Results 1 to 3 of 3

Thread: How does an app pick a RTP port number

  1. #1
    Join Date
    Aug 2012

    Default How does a client picks a RTP port number

    Hi all,

    I hope I am in the right section!
    I am building a client for Wowza which is streaming some video to wowza using RTSP/RTP.
    The RTSP communication goes like this:

    Client Server

    Now at that point the client is suppose to start sending the audio and video using RTP (UDP). But I do not know which port to use, I thought the server would dynamically tell me which port are available. I know the regular port range on Wowza is 6970 - 9999...

    Thanks for your help!
    Last edited by tedator; 08-15-2012 at 06:23 AM.

  2. #2
    Join Date
    Jun 2012



    Since your app will be sending the video stream to wowza, this means that your app will be the server and wowza will be the client.
    In the RTSP SETUP messages the ports are being established. During the RTSP initiation process, the client (wowza) will send the SETUP request specifying a client_port and the server (your app) will have to respond with the client_port it received from wowza and a server_port to which wowza will be sending the RTCP Receiver Reports to keep the streaming session alive.
    The way how the server (your app) response for the RTSP SETUP request has to look like is described in the RTSP RFC document, page 33.
    I hope this info helps.


  3. #3
    Join Date
    Aug 2012


    Hi Zoran,
    thanks for helping me!

    The way I setup things is the other way around. In the table I posted in my first post, the client is my app and the server is Wowza. According to the RFC document, I am using the ANNOUNCE command from the app (client) to Wowza (server), telling the wowza that I am going to send a video/audio stream.
    My ANNOUNCE command looks like this:

    ANNOUNCE rtsp:// RTSP/1.0
    Cseq: 2
    Content-Length: 424
    Content-Type: 1118504
    Authorization: Basic Og==

    o=- 0 0 IN IP4
    c=IN IP4
    t=0 0
    a=tool:Tedator RTP
    m=audio 0 RTP/AVP 96
    a=rtpmap:96 MPEG4-GENERIC/44100/1
    a=fmtp:96 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1208
    m=video 0 RTP/AVP 97
    a=rtpmap:97 H264/90000
    a=fmtp:97 packetization-mode=1;sprop-parameter-sets=Z0IAHo1oFglk,aM4JyA==

    Thanks to your answer, I think I found the solution, I think I need to specify the port I am going to use in the ANNOUNCE call:

    m=audio 6970 RTP/AVP 96
    m=video 6972 RTP/AVP 97

    Meaning that RTP audio will be on 6970, RTCP on 6971
    and RTP video will be on 6972, RTCP on 6973.

    But It still seems strange to tell the server that I am using those ports instead of asking the server which ports to use.
    I am going to try it and let you guys know.

    Thanks again Zoran.

Similar Threads

  1. Port Number Requirement
    By quincy in forum General Forum
    Replies: 1
    Last Post: 05-30-2012, 10:34 AM
  2. limit the number of viewers for an app
    By vision in forum General Forum
    Replies: 2
    Last Post: 04-02-2012, 12:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts