Results 1 to 2 of 2

Thread: publishing point Question

  1. #1
    Join Date
    Jan 2014
    Posts
    6

    Question publishing point Question

    HI

    I trying to make custom server side module.
    I have two questions.
    1. How can i make custom publishing point.
    2. How can i match custom publishing point


    1. How can i make custom publishing point.
    I trying to feeding by FFmpeg

    Regulary Wowza using feed URL like this
    rtsp://[wowza-ip]:1935/[moudleName]/[publishing point name]
    for example) rtsp://wowzaServer.com:1935/live/mystream

    But, In my case, Feed following URL like this
    rtsp://[wowza-ip]:1935/[moudleName]/?(something parameter key=something parameter value)
    for example) rtsp://wowzaServer.com:1935/live/?UID=1234&Room=mystream


    If FFmpeg feeder connect to Wowza using this URL(rtsp://wowzaServer.com:1935/live/?UID=1234&Room=mystream)
    I want to make publishing point using parameter value of room. when onRTPSessionCreate function called.
    (finally, publish like this rtsp://wowzaServer.com:1935/live/mystream)


    Could you tell me some advice, how to publish or publishing API method.


    2. How can i match custom publishing point
    This qeustion also continuous qeustion 1.

    If player(VLC, some other player etc...) client trying to connect wowza, this URL(rtsp://wowzaServer.com:1935/live/?UID=4321&Room=mystream)

    I want to match client connect to rtsp://wowzaServer.com:1935/live/mystream with Do not using redirection method.

    Could you tell me some advice, how to match publishing point or match publishing point API method.


    Thank you.

  2. #2

    Default

    Hi,

    It is not possible to do this like you want as it would require modification to the RTSP headers at a very low level which is not possible.

    Initially, I thought you may be able to use one of the IMediaStreamNameAliasProvider2 methods to do it but on closer inspection, I can see that there would be a problem with setting the application that the session connect to correctly.

    The following rules are used to set the application name and stream name for an rtsp session. It looks at the path part of the URL (everything between rtsp://wowzaServer.com:1935 and ?UID=1234&Room=mystream in your case).

    The path is split into parts on the path delimiters ("/") in your case, there would be one part `live`.

    If there is just one part, the application name is "_defapp_" which is the default name when no name is defined.
    The stream name is the part. (live in your case).

    If there are 2 parts, the application name is the first part & the stream name is the second part. The application instance name is _definst_.

    If there are 3 or more parts, the application name is the first part, the application instance name is the second part and the stream name is the remaining parts joined back together with "/".
    With these rules in mind, you may be able to do the following with a slightly different url format.

    rtsp://wowzaServer.com:1935/live/_definst_/UID=1234/Room=mystream
    This will use the third rule (for 3 or more parts)

    The IMediaStreamNameAliasProvider2.resolvePlayAlias(IApplicationInstance appInstance, String name, RTPSession rtpSession) method is called when the RTP stream is created to resolve the name that should be used for the stream, `UID=1234/Room=mystream` should be passed into the method as the name value. You can extract your own name out of this and return that.

    public String resolvePlayAlias(IApplicationInstance appInstance, String name, RTPSession rtpSession)
    {
    	String parts[] = name.split("/");
    	for(String part : parts)
    	{
    		if(part.toLowerCase().startsWith("room") && part.indexOf("=") > -1)
    		{
    			name = part.subString(part.indexOf("=") + 1);
    			break;
    		}
    	}
    	return name;
    }
    I haven't tested this but it should work for both RTSP published streams as well as playback.

    The playback stream would also be available directly by using the actual name as you would with a regular streaming url.

    If you want to prevent the stream from being created then you return null from the resolvePlayAlias methods. Note: the interface also provides other resolvePlayAlias methods for other player types. You should make sure you return the correct values from these.

    Roger.

Similar Threads

  1. WoWza Publishing point for Softlayer CDN
    By mnavas in forum Live Streaming and Encoder Discussion
    Replies: 9
    Last Post: 01-13-2013, 03:40 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
  •