Results 1 to 5 of 5

Thread: http(hls) streaming with smil file to refer 1 mp4 file ( multi-cahannels )

  1. #1
    Join Date
    Nov 2009
    Posts
    24

    Default http(hls) streaming with smil file to refer 1 mp4 file ( multi-cahannels )

    Hi,

    We are using the Wowza Media Server 3.6 to streaming (HTTP HLS) multi-channel MP4 video streams to jwplayer. ( we using the plugins as in this link : http://www.wowza.com/forums/content....erActionNotify ).

    It works without problem if we just supply the url with the query parameters mp4:sample.mp4?audioindex=0, the problem occurs if we using
    smil file to support the adaptive streaming as in the following example :

    <?xml version="1.0" encoding="UTF-8"?>
    <smil>
    <head>
    <meta base="rtmp://172.16.18.52:1935/vod" />
    </head>
    <body>
    <switch>
    <video src="mp4:sample.mp4?audioindex=0" system-bitrate="100000" width="200" height="300">
    <param name="videoCodecId" value="avc1.66.30" valuetype="data" />
    <param name="audioCodecId" value="mp4a.40.2" valuetype="data" />
    </video>
    </switch>
    </body>
    </smil>

    it didn't work with this example, because it took the query parameter as part of the file name!

    Could you please give some advice or example to how to let it works correctly?

    Many thanks,

    qstream

  2. #2
    Join Date
    Jun 2012
    Posts
    719

    Default

    Hello,

    Can you use a smil file similar to this?
    <smil>
    <head/>
    <body>
    <switch>
    <video src="mp4:sample.mp4" system-bitrate="100000" width="200" height="300">
    <param name="videoCodecId" value="avc1.66.30" valuetype="data" />
    <param name="audioCodecId" value="mp4a.40.2" valuetype="data" />
    </video>
    </switch>
    </body>
    </smil>
    Assuming that your SMIL file is named sample.smil, can you use this HLS streaming request?

    http://172.16.18.52:1935/vod/smil.sample.smil/playlist.m3u8?audioindex=0

    This way, the query string should be passed to Wowza.

    Zoran

  3. #3
    Join Date
    Nov 2009
    Posts
    24

    Default

    Hello,

    It didn't work as you suggested, because in the multichannel selection module i didn't get the query parameter in the method :

    public void onHTTPSessionCreate(IHTTPStreamerSession httpSession)

    or in other words, how can I pass the selected index to the MediaReaderListener ( because the actual channel selection is done

    in the onMediaReaderOpen method, for adaptive smil streaming, you need more different index to select within the same file name with multiple bitrates channels )

    If the client request with following url http://wozaip:1935/vod/smil:sample.smil/playlist.m3u8, where can I get the query string? It seems

    it didn't go to method onHTTPSessionCreate(IHTTPStreamerSession httpSession) if I implement the IMediaReaderActionNotify.


    anyways, if it works, how can i combine the different bitrates with the same file name in the smil file, for example :


    <smil>
    <head/>
    <body>
    <switch>
    <video src="mp4:sample.mp4?audioindex=0" system-bitrate="100000" width="200" height="300">
    <param name="videoCodecId" value="avc1.66.30" valuetype="data" />
    <param name="audioCodecId" value="mp4a.40.2" valuetype="data" />
    </video>
    <video src="mp4:sample.mp4?audioindex=1" system-bitrate="20000" width="200" height="300">
    <param name="videoCodecId" value="avc1.66.30" valuetype="data" />
    <param name="audioCodecId" value="mp4a.40.2" valuetype="data" />
    </video>
    </switch>
    </body>
    </smil>


    Quote Originally Posted by zoran_u View Post
    Hello,

    Can you use a smil file similar to this?
    <smil>
    <head/>
    <body>
    <switch>
    <video src="mp4:sample.mp4" system-bitrate="100000" width="200" height="300">
    <param name="videoCodecId" value="avc1.66.30" valuetype="data" />
    <param name="audioCodecId" value="mp4a.40.2" valuetype="data" />
    </video>
    </switch>
    </body>
    </smil>
    Assuming that your SMIL file is named sample.smil, can you use this HLS streaming request?

    http://172.16.18.52:1935/vod/smil.sample.smil/playlist.m3u8?audioindex=0

    This way, the query string should be passed to Wowza.

    Zoran

  4. #4

    Default

    Hi,

    The method Zoran mentioned should work with the default module. The query parameter should be attached to the session and available in onHTTPSessionCreate. It is then put into the session properties for when the stream is actually requested.

    It is possible with hls, that the mediaReader is being set up before the HLS session so the property wouldn't be available. We would have to do some tests.

    Another option is to use the IMediaStreamNameAliasProvider(2) interface and set the properties in one of the resolvePlayAlias methods. These are called before the onHTTPSessionCreate method.

    I think it would also work for your second option of having multiple copies of the same stream in your smil file.

    The resolve alias method is called for the original smil file as well as each of the items in the file. You could set the settings for each video as it is requested.

    Roger.

  5. #5
    Join Date
    Nov 2009
    Posts
    24

    Default

    Hi,

    Thanks, indeed it works as you suggested, I'm now tring to implement my own module to streams different bitrates by using url query

    parameters in combination with jwplayer smil file to refer the single multi-tracks mp4. I hoop it will work.

    qstream

Similar Threads

  1. add http headers for apple HLS m3u8 file and ts file
    By johsun in forum Live Streaming and Encoder Discussion
    Replies: 6
    Last Post: 11-15-2013, 06:32 AM
  2. Replies: 1
    Last Post: 07-25-2013, 03:35 AM
  3. problem with multibitrate http streaming with smil file
    By ManGood in forum Live Streaming and Encoder Discussion
    Replies: 4
    Last Post: 05-16-2012, 04:18 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
  •