Results 1 to 2 of 2

Thread: Re-streaming a dynamic RTSP stream based on a query string

  1. #1
    Join Date
    Mar 2013
    Posts
    11

    Default Re-streaming a dynamic RTSP stream based on a query string

    Hi,

    I want to re-stream a dynamic RTSP stream which I get from a third party service, based on a username, password and some other parameters.
    I call VLC like this:

    rtsp://wowza-ip:1935/live/[appInst]/someUniqueStreamName.stream?user=xxx&password=xxx&otherParams..
    The file someUniqueStreamName.stream does not exist at this point.

    On Wowza I defined the following Module:

    public class LiveModule extends ModuleBase {
    	public void onRTPSessionCreate(RTPSession rtpSession) {
    		String queryString = rtpSession.getQueryStr();
    		
    		// call 3rd party service with the params from queryString
    		
    		// get a rtsp stream like this from the 3rd party service:
    		// rtsp://ec2-xxxx.amazonaws.com:1935/live/xxx.stream?someParams
    		
    		// based on the above rtsp stream, create the someUniqueStreamName.stream file on disk, containing the above rtsp stream
    		
    		appInstance.startMediaCasterStream(someUniqueStreamName.stream, "rtp");
    	}
    }
    In other words, I want to create the someUniqueStreamName.stream file on-the-fly, then watch its dynamically generated content in VLC. But it just doesn't work. I get the error "Your input can't be opened:
    VLC is unable to open the MRL" in VLC. The file someUniqueStreamName.stream gets created properly with the proper rtsp url from the 3rd party.

    Exactly the same on-the-fly stream file creation approach works great for HLS streaming and I can watch the stream on iOS. I have defined the following in the same module:

    public class LiveModule extends ModuleBase {
    	public void onHTTPSessionCreate(IHTTPStreamerSession httpSession) {
    		String queryString = httpSession.getQueryStr();
    		
    		// same code as above
    	}
    }
    I hope you get the idea of what I need to achieve. I'm not sure whether my approach is the proper one or I should change to another one.

    Thank you in advance for any advice.

    Ciprian

  2. #2

    Default

    Take a look at this API for for aliasing stream names:
    How to use the IMediaStreamNameAliasProvider2 interface

    Salvadore

Similar Threads

  1. Query string placement in stream URLs
    By seanngreen in forum General Forum
    Replies: 1
    Last Post: 03-06-2013, 07:53 AM
  2. MediaCache and query string
    By robw21 in forum General Forum
    Replies: 6
    Last Post: 04-18-2012, 12:33 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
  •