I am trying to play selected parts of a vod file with adobe HDS ;

however, the player only plays the second rendition of the medialist segment; I need help. For example: I would like to play the sample.mp4 file for 15 seconds starting from second 20 and second 200.  connectUrl: http://[ip address]:1935/vod/amlst:sample.mp4/manifest.f4m

public class ModuleTest implements IMediaListProvider {

public MediaList resolveMediaList(IMediaListReader mediaListReader, IMediaStream stream, String streamName) { double duration = StreamUtils.getStreamLength(stream.getClient().getAppInstance(), streamName); duration = duration*1000;

MediaList mediaList = new MediaList();

if( duration >=300000) { MediaListSegment segment = new MediaListSegment(); mediaList.addSegment(segment);

MediaListRendition rendition1 = new MediaListRendition(); segment.addRendition(rendition1); rendition1.setName(streamName); rendition1.setBitrateAudio(128000); rendition1.setBitrateVideo(400000); rendition1.setWidth(320); rendition1.setHeight(240); rendition1.setPlayStart(20000); rendition1.setPlayDuration(15000); rendition1.setAudioCodecId(“mp4a.40.2”); rendition1.setVideoCodecId(“avc1.66.12”); // second rendition MediaListRendition rendition2 = new MediaListRendition(); segment.addRendition(rendition2);

rendition2.setName(streamName); rendition2.setBitrateAudio(128000); rendition2.setBitrateVideo(400000); rendition2.setWidth(320); rendition2.setHeight(240); rendition2.setPlayStart(200000); rendition2.setPlayDuration(15000); rendition2.setAudioCodecId(“mp4a.40.2”); rendition2.setVideoCodecId(“avc1.66.12”); }

return mediaList;

} }

Hi,

the MediaList API is used to create a list of alternative bitrate renditions of the same content. It isn’t designed for creating a playlist of separate pieces of content.

There currently isn’t a way to do this server side so the only option is to do it player side by calling each rendition as separate URLs and using different wowzaplaystart and wowzaplayduration parameters for each one.

Thank you @Roger Littin for replying. I actually ended up with a similar solution 3 days after I posted the question.