Results 1 to 7 of 7

Thread: Assigning RTP Stream Ids based on external call or parameter name

  1. #1

    Default Assigning RTP Stream Ids based on external call or parameter name

    Hello,

    I'm new to Wowza and actually working with streaming video for that matter.

    I'm trying to accomplish a setup where I am publishing RTP streams from multiple different client devices, they can vary from ip cameras, laptop camera mobile etc.
    I need to be able uniquely assign an identifier for each new stream that is published from these devices and these ids need to be based on external business logic.

    Can I do either of the following?

    1. Can I assign a predetermined stream name at publish time through some parameter information?
    2. Can I make an external REST call to obtain an ID for the stream?

    Preferably the first would be better if possible.

    Thanks

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    You can't assign a publish name in Wowza, it has to be set in the encoder. You can use an predetermined alias in Wowza that maps to a published stream. There are a couple of ways to do that, but for your purpose take a look at the Stream Alias API:

    http://www.wowza.com/forums/content....der2-interface

    You can make an HTTP call from this interface to return the real stream name for an alias. HTTP calls in a Wowza application can cause problems, but if they used sparingly as this is just once per session it should be okay.

    Richard

  3. #3

    Default

    Quote Originally Posted by rrlanham View Post
    You can't assign a publish name in Wowza, it has to be set in the encoder. You can use an predetermined alias in Wowza that maps to a published stream. There are a couple of ways to do that, but for your purpose take a look at the Stream Alias API:

    http://www.wowza.com/forums/content....der2-interface

    You can make an HTTP call from this interface to return the real stream name for an alias. HTTP calls in a Wowza application can cause problems, but if they used sparingly as this is just once per session it should be okay.

    Richard
    Thanks for the response, I read where it says "and you cannot use .stream files if you are using this interface". Does this also apply to .sdp files?
    This .stream file is of another format. Because I'm using RTP I have to use .sdp files by the looks of it.

    I don't know how this could be the case though since the .sdp file contains information specific to the stream?

    Just to let you know, I'm at a point where I can stream from one device using RTP using a sdp configuration file such as conf/myStream.sdp and have it display using /examples/LiveVideoStreaming/client/live.html. So although I'm new, I'm not clueless

    *** EDIT ***

    So this is only for resolving the stream names, I need to assign a unique rtp stream name on publish though. You say this needs to be done in the encoder, so perhaps you could explain this a little more?
    As I mentioned this is a very common case where you will have multiple live streaming channels and multiple clients viewing these channels. How does this resolution take place for RTP when you publish a new channel on the fly?
    Last edited by samtheman; 06-24-2012 at 12:10 PM.

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    You could simulate this by wrapping the stream in a Stream class stream. Use the IMediaStreamActionNotify.onPublish() handler to create a Stream class stream with the published stream as the source.

    http://www.wowza.com/forums/content....-of-codec-info

    Something like this:

    public void onPublish(IMediaStream stream, String streamName, boolean isRecord, boolean isAppend)
    	{
    		String newStreamName;
    		// get new stream name from your system.			
    		Stream stream1 = Stream.createInstance(stream.getStreams().getAppInstance(), newStreamName);
    		stream1.play(stream.getName(), -2, -1, true);
    	}

    The "-2" in the 2nd arg (start) signifies that the source is a live stream from RTMP encoder. The "-1" in the 3rd arg (length) means play to the end, or in case of live stream indefinitely.

    Richard

  5. #5

    Default

    Thanks, this looks interesting, hopefully though it doesn't end up in creating an additional duplicate stream.
    BTW, be more helpful to devs. if you had a HTML version of your server api available off your site instead of having it embedded in a PDF.

  6. #6
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Actually this event will fire when you start the new stream, so you will have to manage that.

    Richard

  7. #7
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    About the HTML javadocs, I'm not sure, it might be considered, but it probably has already been considered. Some of the packages have html javadocs.

    Richard

Similar Threads

  1. Replies: 2
    Last Post: 07-07-2014, 06:45 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
  •