Results 1 to 5 of 5

Thread: One input stream to two outputs

  1. #1

    Default One input stream to two outputs

    Hi folks,

    I use WMSPanel to secure my streams, but I'm facing a situation where I need to apply different rules to the same cupertino stream, whether it's being sent to a mobile device or a desktop.

    I can see a few ways to do this, but I'd like to check first if anybody has done this, or has any better advice

    1) Create two applications (livetv and mobiletv). Use the stream manager for application mobiletv to connect to rtmp://localhost:1935/livetv/MyStream
    Though I have WMSauth protection on the RTMP output, I presumably could whitelist so it's not required?

    2) Use StreamNameAlias module to create a different version of the stream, so for example livetv/MyStream and livetv/MyStream-mobile
    But I'm not sure, if the alias is set up, the the stream still accessible from its original name?

    3) Send two input streams, one to each application. By far the simplest way, but quite wasteful of bandwidth!

    4) Use separate instances under one application? I'm really not sure if this would work, but if I send the stream to server/livetv/MyStream, would it be accessible from server/livetv/web/MyStream and server/livetv/mobile/MyStream?

    5) Some hidden setting in wowza to allow two applications to share an input stream?

    Anyway I will do some experimenting with this now, will report back here but would really appreciate any insight!

  2. #2


    Can you explain what you mean by apply different rules to the same stream?
    Do you need different bitrates or different authentication rules?


  3. #3


    Two different authentication rules, specifically a longer validity for the authentication code, as it won't be generated each time a stream is launched, but each time the app is opened.

    Also it would allow me to tweak the packetization, etc, separately

  4. #4



    Option 1 or option 2 would be the best, depending on what it is that you want to do.

    Option 1 would give you 2 completely separate streams on separate application or appInstances so you can packetize separately and apply different rules.

    Option 2 would use the same source stream so it would only be packetized once. You could apply different rules to each alias. You should be able to block access to the original stream name quite easy by removing the default rule.

    Another option is to use the Stream api and create a second stream dynamically from the first one when it is published. It would be fairly simple to do and would be automatic.

    The following snippet shows the IMediaStreamActionNotify2.onPublish & onUnPublish methods that you would use.

    	public void onPublish(IMediaStream stream, String streamName, boolean isRecord, boolean isAppend) {
    		Stream mobileStream = Stream.createInstance(stream.getStreams().getAppInstance(), streamName+"-mobile");
    		if(mobileStream != null)
    		{, -2, -1, true);
    			stream.getProperties().setProperty("mobileStream", mobileStream);
    	public void onUnPublish(IMediaStream stream, String streamName, boolean isRecord, boolean isAppend) {
    		Stream mobileStream = (Stream) stream.getProperties().remove("mobileStream");
    		if(mobileStream != null)
    This will publish the second stream with -mobile added to the name to the same appInstance. This will then get packetized separately so you could apply different settings.


  5. #5


    Well, turns out this was unnecessary....

    My primary concern was to apply different validity periods to the WMSAuth links. But I forgot that this validity period is set from the PHP side and not from Wowza, so in the end I can still use the same application/streams *facepalm*

Similar Threads

  1. Outputs using Google Cloud
    By CBBrewCo in forum Wowza Streaming Engine in the Cloud
    Replies: 1
    Last Post: 07-02-2014, 01:15 AM
  2. HELp ! - trying to get muti outputs on 1 computer
    By cblzaccie1 in forum General Forum
    Replies: 3
    Last Post: 08-17-2013, 05:43 PM
  3. Tuning for many inputs, few outputs
    By Bencredible in forum Performance Tuning Discussion
    Replies: 7
    Last Post: 03-13-2013, 03:53 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