How can I read a live webstream in java using xuggle? (I can do it in ffmpeg, just not xuggle)

廉价感情. 提交于 2019-12-05 04:02:36

The rtmp source string should be in the following format

String rtmpSourceUrl = "rtmp://hostname/appName/streamName"; 

Then I would recommend creating the reader like the following

IContainerFormat inFormat = IContainerFormat.make();
inFormat.setInputFormat("flv"); // set the input format to avoid FFMPEG
                                    // probing
IMediaReader reader = ToolFactory.makeReader(rtmpSourceUrl);
reader.setQueryMetaData(false);
reader.setBufferedImageTypeToGenerate(-1);
reader.getContainer().setForcedVideoCodec(ID.CODEC_ID_FLV1);
reader.getContainer().open(rtmpSourceUrl , IContainer.Type.READ, inFormat,
            true, false);

Does this solve your problem?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!