0
是否有可能添加備用(備用)流到HLS使用Java API以產生動態播放列表(AMLST)當在Wowza體現。冗餘HLS流在Wowza
我有這樣的,我動態添加不同的比特率的編碼,但我想補充一個備份流。 (我嘗試添加第二個MediaListSegment,但它似乎不起作用)。
package com.wowza.wms.plugin.test.module;
import com.wowza.wms.medialist.*;
import com.wowza.wms.module.*;
import com.wowza.wms.stream.*;
import com.wowza.wms.application.*;
public class ModuleAMLSTTestLive extends ModuleBase
{
class MyMediaListProvider implements IMediaListProvider
{
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(streamName+"_400");
rendition1.setBitrateAudio(128000);
rendition1.setBitrateVideo(400000);
rendition1.setWidth(320);
rendition1.setHeight(240);
rendition1.setAudioCodecId("mp4a.40.2");
rendition1.setVideoCodecId("avc1.66.12");
MediaListRendition rendition2 = new MediaListRendition();
segment.addRendition(rendition2);
rendition2.setName(streamName+"_800");
rendition2.setBitrateAudio(128000);
rendition2.setBitrateVideo(800000);
rendition2.setWidth(640);
rendition2.setHeight(480);
rendition2.setAudioCodecId("mp4a.40.2");
rendition2.setVideoCodecId("avc1.77.31");
return mediaList;
}
}
public void onAppStart(IApplicationInstance appInstance)
{
appInstance.setMediaListProvider(new MyMediaListProvider());
}
}