如何在对等连接中启用h264? [英] how to enable h264 in peerconnection?

查看:95
本文介绍了如何在对等连接中启用h264?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多媒体说firefox在webrtc中支持h264,但是我找不到任何信息。

many media says firefox support h264 in webrtc, but I can't find any information.

如何在webrtc中启用h264?

How to enable h264 in webrtc?

这是我的mediaConstraints

This is my mediaConstraints

var mediaConstraints = {
    video: {
        mandatory: {
           maxWidth: 640,
           maxHeight: 480
        }
    },
    audio: true
};


推荐答案

似乎默认情况下不支持H264 。您必须将编解码器行手动添加到SDP 中,然后再将其设置为本地并发送报价。看起来他们很努力工作,希望尽快推出。您可以通过jesup在他们的会议中所做的工作看到这一点 4月22日 4月29日

It would seem that H264 is not supported by default yet. You will have to add the codec line manually into the SDP before setting it as local and sending the offer. It does look like they are hard at work to get it out soon. You can see this with the work that jesup is doing within their meetings April 22 and April 29

因此,默认情况下不会添加它,但是您可以在创建的SDP中添加一行以将其添加为受支持的编解码器。

So, it is not added by default but you can add a line to your created SDP to add it as a supported codec.

只需确保您在使用夜间版本,而不只是Firefox的发行版本,以确保您获取最新的h264补丁程序并正常工作。

Just make sure you are using the nightly version and not just the release version of Firefox to make sure you are getting the latest h264 patches and work.

这篇关于如何在对等连接中启用h264?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆