首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MPEG2-TS的Xuggler字段

MPEG2-TS的Xuggler字段
EN

Stack Overflow用户
提问于 2018-12-16 15:42:04
回答 1查看 59关注 0票数 0

我正在尝试使用Xuggler创建一个视频输出流,并使用示例代码成功地输出到流中:

代码语言:javascript
复制
    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方法中有哪些字段?

EN

回答 1

Stack Overflow用户

发布于 2018-12-16 15:59:52

我只是猜了一下,碰巧找到了。其他任何想知道的人:

代码语言:javascript
复制
containerFormat.setOutputFormat("mpegts", null, "application/mpegts");
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53800351

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档