我正在尝试使用Xuggler创建一个视频输出流,并使用示例代码成功地输出到流中:
mediaWriter = ToolFactory.makeWriter(XugglerIO.map(outputStream));
IContainerFormat containerFormat = IContainerFormat.make();
containerFormat.setOutputFormat("ogg", null, "application/ogg");
mediaWriter.getContainer().setFormat(containerFormat);
// add the video stream
mediaWriter.addVideoStream(0, 0, ICodec.ID.CODEC_ID_THEORA, size.width, size.height);但是,我希望使用MPEG-2TS作为输出格式,而不是ogg格式。如果要以MPEG-2TS格式输出,setOutputFormat方法中有哪些字段?
发布于 2018-12-16 15:59:52
我只是猜了一下,碰巧找到了。其他任何想知道的人:
containerFormat.setOutputFormat("mpegts", null, "application/mpegts");https://stackoverflow.com/questions/53800351
复制相似问题