Results 1 to 10 of 31

Thread: New: Ability to specify a play start time and duration for HTTP streaming

Hybrid View

  1. #1

    Default New: Ability to specify a play start time and duration for HTTP streaming

    Note: New in Wowza Media Server 3 Preview 3

    You can now play a portion of an video on demand file when streaming using HTTP streaming to iOS devices, smooth streaming or Flash HTTP streaming. There are several ways to specify the start time and duration.

    • Query parameters: All HTTP streaming protocols now support a playstart and or playduration query parameter. Times are specified in milliseconds. For example to play the sample.mp4 starting at 30 seconds for a duration of 40 seconds to an iOS device, use the URL:
      Code:
      http://[wowza-ip-address]:1935/vod/mp4:sample.mp4?playstart=30000&playduration=40000
    • Server-side API:You can specify the playStart and playDuration times through the IHTTPStreamerSession session API. Values are in milliseconds. For example in a module you can use the following method:
      Code:
      public void onHTTPSessionCreate(IHTTPStreamerSession httpSession)
      {
      	httpSession.setPlayStart(30000);
      	httpSession.setPlayDuration(40000);
      }
    • SMIL file:In a SMIL file using the begin and dur attributes. These attributes are specified in seconds:
      Code:
      <smil>
      	<head>
      	</head>
      	<body>
      		<switch>
      			<video begin="30.0" dur="40.0" src="mp4:sample.mp4" system-bitrate="450000"/>
      		</switch>
      	</body>
      </smil>
    • MediaList API:Using the MediaList API. The values are specified in milliseconds:
      Code:
      public class ModuleAMLSTTest extends ModuleBase implements IMediaListProvider
      {
      	public void onAppStart(IApplicationInstance appInstance)
      	{
      		appInstance.setMediaListProvider(this);
      	}
      	
      	public MediaList resolveMediaList(IMediaListReader mediaListReader, IMediaStream stream, String streamName)
      	{
      		MediaList mediaList = new MediaList();
      		
      		MediaListSegment segment = new MediaListSegment();
      		mediaList.addSegment(segment);
      		
      		MediaListRendition rendition1 = new MediaListRendition();
      		segment.addRendition(rendition1);
      		
      		rendition1.setName("mp4:sample.mp4");
      		rendition1.setBitrateAudio(128000);
      		rendition1.setBitrateVideo(400000);
      		rendition1.setWidth(320);
      		rendition1.setHeight(240);
      		rendition1.setPlayStart(30000);
      		rendition1.setPlayDuration(40000);
      				
      		return mediaList;
      	}
      }


    Charlie
    Last edited by charlie; 09-19-2011 at 10:19 AM.

  2. #2

    Default

    This is very good news thanks

  3. #3

    Default

    Hey Charlie,

    Wanted to let you know that I've been testing this (running 3.0.0-preview4 build648) through API and query strings yet it doesn't seem to work with SmoothStreaming. I setup a completely new vod application to make sure, am using the provided sample.mp4 and Silverlight client. Logs show that the ?playstart=... is passed to WMS.

    Works perfectly for sanjose, haven't gotten around to cupertino testing yet.

    Cheers,
    Phil

  4. #4
    Join Date
    Dec 2007
    Posts
    25,673

    Default

    Phil,

    I have had trouble with Silverlight and querystrings too, and am not sure what the solution, or what I was doing wrong perhaps. Try the smil method instead

    Richard

  5. #5
    Join Date
    Dec 2007
    Posts
    25,673

    Default

    Phil,

    Try &amp; instead of & and %3F instead of ?

    Richard

  6. #6

    Default

    Hi Richard,

    Tried that and various other urlencoded version of the string - that either failed to launch the handler:
    Code:
    DEBUG server comment - HTTPStreamerAdapterCupertinoStreamer.canHandle[vod/sample.mp4]: false
    or just started playing from beginning. I also tried just using either one of the parameters.

    Using the API doesn't work either:
    Code:
    httpSession.setPlayStart(30000);
    httpSession.setPlayDuration(40000);
    Cheers,
    Phil

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •