本文介绍了Kurento Media WebRTC 到 RTP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 kurento 的 master git 来制作一个 WebRTC 到 RTP 的桥接器.

I am using kurento's master git to make a WebRTC to RTP bridge.

MediaPipeline pipeline = kurento.createMediaPipeline();
WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline).build();
HttpGetEndpoint httpEndpoint=new HttpGetEndpoint.Builder(pipeline).build();

org.kurento.client.Fraction fr= new org.kurento.client.Fraction(1, 30);
VideoCaps vc= new VideoCaps(VideoCodec.H264,fr);
httpEndpoint.setVideoFormat(vc);

AudioCaps ac= new AudioCaps(AudioCodec.PCMU, 65536);
httpEndpoint.setAudioFormat(ac);

webRtcEndpoint.connect(httpEndpoint);

尽管如此,输出视频播放被编码为 webm .我也尝试过各种其他方法(使用 RTP ENdpoint、使用 Gstream 过滤器、使用 VLC HTTP 到 RTP 流送器).但是没有任何方法可以让我在 safari 和 IE 上播放视频,即 H264 编码.请求媒体开发人员和 kurento 团队的帮助.

However inspite of this the output video playing is encoded to webm . I have tried various other approaches as well ( using RTP ENdpoint , using Gstream filter , using VLC HTTP to RTP streamer ) . however no method gives me a video playable on safari and IE ie H264 encoded . Requesting media developers and kurento team for help .

推荐答案

Safari 和 IE 不支持 RTP/H.264.从您的代码中,我了解到您正在尝试创建一个 WebRTC 来标记桥接.在这种情况下,HttpGetEndpoint 将通过 HTTP 伪流提供媒体.但是,Kurento 仅提供 WebM 格式的那种实时 HTTP 伪流.据我所知,Safari 和 IE 都不支持 WebM,因此您想要做的不会独立于您强制使用 HttpGetEndpoint 的上限.您将只能看到它在 Chrome、Fireforx 或其他支持 WebM 的浏览器上运行.

Safari and IE do not support RTP/H.264. From you code, I understand that you are trying to create a WebRTC to tag bridge. In that case, the HttpGetEndpoint will provide media through HTTP pseudostreaming. However, Kurento only provides that type of live HTTP pseudostreaming in WebM format. To be best of my knowledge, neither Safari nor IE support WebM, hence what you want to do will not work independenlty on the caps you force to the HttpGetEndpoint. You will be only able to see it working on Chrome, Fireforx or other browsers with WebM support.

您唯一的解决方案可能是 HttpGetEndpoint 以 MP4 格式(或 IE 和 Safari 支持的任何其他格式)提供媒体,但以该格式创建实时流非常棘手,我们(Kurento 团队)没有实施该功能的时间和此功能不在我们的短期路线图中.

The only solution for you could be the HttpGetEndpoint providing media in MP4 format (or any other format supported by IE and Safari), but creating the live stream in that format is very tricky and we (the Kurento team) did not had the time for implementing that and this feature is not in our short term roadmap.

但是,我们有很多用户使用 RTMP 将 WebRTC 与 IE 和 Safari 集成.在这种情况下,您需要将 Kurento 与支持 RTMP 的媒体服务器集成(这可以通过不同的方式完成),然后让 RTMP 媒体服务器为浏览器提供媒体服务.

However, we have many users integrating WebRTC with IE and Safari using RTMP. In that case, you need to integrate Kurento with an RTMP capable media server (this can be done in different ways) and later let the RTMP media server to serve media to the browsers.

这篇关于Kurento Media WebRTC 到 RTP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-10 17:08