简体   繁体   English

如何将Firefox连接到Chrome以通过WebRTC传输h264?

[英]How to connect Firefox to Chrome to transfer h264 via WebRTC?

I try to connect Firefox 45 to Chrome 51dev to transfer h264 video. 我尝试将Firefox 45连接到Chrome 51dev以传输h264视频。 Firefox to Firefox and Chrome to Chrome works perfectly. Firefox到Firefox和Chrome到Chrome的效果非常好。 But Firefox to Chrome transfers vp8 video even though I set the priority h264. 但即使我设置优先级h264,Firefox到Chrome也会传输vp8视频。

To set the codec priority I used this link: https://miguelpdl.github.io/WebRTC-codelab/session06/lab/html/step03.html 要设置编解码器优先级,我使用了以下链接: https//miguelpdl.github.io/WebRTC-codelab/session06/lab/html/step03.html

On the answer side remote description contains: 在答案方面,远程描述包含:

m=video 53100 UDP/TLS/RTP/SAVPF 107 100 101 116 117 96 97 99 98
...
a=rtpmap:107 H264/90000
a=rtpmap:100 VP8/90000
a=rtpmap:101 VP9/90000
a=rtpmap:116 red/90000
a=rtpmap:117 ulpfec/90000
a=rtpmap:96 rtx/90000
a=rtpmap:97 rtx/90000
a=rtpmap:99 rtx/90000
a=rtpmap:98 rtx/90000

But local description contains only: 但本地描述仅包含:

m=video 9 UDP/TLS/RTP/SAVPF 100
...
a=rtpmap:100 VP8/90000

Can I connect Firefox to Chrome to transfer h264? 我可以将Firefox连接到Chrome以传输h264吗?

Chrome does not yet support H.264. Chrome尚不支持H.264。 For proof, see this fiddle which removes the VP8 codec. 为了证明,请看这个删除VP8编解码器的小提琴

The fiddle lets you cut'n'paste offer/answers to make a connection between two tabs or browsers, but for now, just paste the offer into a text editor and look at it: 这个小提示让你切断'''''''''''''''''to to to to to to to to to to to to to to to to to to to to to to to to to to to to to to to

You'll find that Firefox offers H.264 to spec: 你会发现Firefox提供H.264规范:

a=rtpmap:126 H264/90000
a=rtpmap:97 H264/90000    

whereas Chrome offers VP8 only, in spite of us just having removed it: 而Chrome只提供VP8,尽管我们刚刚删除了它:

a=rtpmap:100 VP8/90000

So when you say it works from Chrome to Chrome, I think you're really seeing VP8. 所以当你说它适用于从Chrome到Chrome时,我认为你真的看到了VP8。

They are apparently working H.264 though. 他们显然正在使用H.264

Update: Apparently H.264 support is behind a flag in Chrome 50 . 更新:显然,H.264支持是Chrome 50中的一个标志 Enable it with: 启用它:

chrome://flags/#enable-webrtc-h264-with-openh264-ffmpeg

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM