我开发了 Red 5 flex 应用程序来录制实时视频流。现在我想将相同的流记录为灰度。
这是动作脚本中的代码:
ns= new NetStream(nc);
ns.videoStreamSettings = h264Settings;
ns.publish(stream_id,"record");
ns.attachAudio(mic);
ns.attachCamera(cam);
代码 Red5 服务器:
public void recordShow() {
IConnection conn = Red5.getConnectionLocal();
logger.debug("Recording show for: {}", conn.getScope().getContextPath());
String streamName = String.valueOf(System.currentTimeMillis());
// Get a reference to the current broadcast stream.
IBroadcastStream stream = app.getBroadcastStream(conn.getScope(), "hostStream");
try {
// Save the stream to disk.
stream.saveAs(streamName, false);
} catch (Exception e) {
logger.error("Error while saving stream: {}", streamName);
}
}
我尝试使用过滤器,它显示灰度但不以灰度记录。如何将直播流转为灰度,并进行灰度录制。