Skip to content

Instantly share code, notes, and snippets.

@voluntas
Last active April 13, 2017 11:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voluntas/a85b626f3a2702866711 to your computer and use it in GitHub Desktop.
Save voluntas/a85b626f3a2702866711 to your computer and use it in GitHub Desktop.
Firefox の WebRTC で H264 を使う

Firefox の WebRTC で H264 を使う

このメモを取るに当たり @massie_g が開発した手動シグナリングシステムをお借りしました。

http://qiita.com/massie_g/items/f5baf316652bbc6fcef1

SDP

  • SDP は H264 を使うように書き換えてます
  • IP アドレスは 192.0.2.x に書き換えてます

client:

v=0
o=Mozilla-SIPUA-35.0.1 26793 0 IN IP4 0.0.0.0
s=SIP Call
t=0 0
a=ice-ufrag:b79ba244
a=ice-pwd:41c5111b61b7eac300f06f8d897b4e8b
a=fingerprint:sha-256 E1:36:44:CC:41:B5:73:5F:C4:AA:87:90:D6:71:69:11:18:28:09:80:1D:DC:E5:90:68:EF:9F:83:FD:B5:9C:A3
m=audio 9 RTP/SAVPF 109 9 0 8 101
c=IN IP4 0.0.0.0
a=rtpmap:109 opus/48000/2
a=ptime:20
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=recvonly
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=setup:actpass
a=rtcp-mux
a=candidate:0 1 UDP 2130379007 192.0.2.15 53016 typ host
a=candidate:1 1 UDP 2128609535 192.0.2.3 50542 typ host
a=candidate:0 2 UDP 2130379006 192.0.2.15 58632 typ host
a=candidate:1 2 UDP 2128609534 192.0.2.3 57673 typ host
m=video 9 RTP/SAVPF 126 97
c=IN IP4 0.0.0.0
a=rtpmap:126 H264/90000
a=fmtp:126 profile-level-id=42e01f;packetization-mode=1
a=rtpmap:97 H264/90000
a=fmtp:97 profile-level-id=42e01f
a=sendrecv
a=rtcp-fb:126 nack
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 ccm fir
a=rtcp-fb:97 nack
a=rtcp-fb:97 nack pli
a=rtcp-fb:97 ccm fir
a=setup:actpass
a=rtcp-mux
a=candidate:0 1 UDP 2130379007 192.0.2.15 57210 typ host
a=candidate:1 1 UDP 2128609535 192.0.2.3 65333 typ host
a=candidate:0 2 UDP 2130379006 192.0.2.15 57446 typ host
a=candidate:1 2 UDP 2128609534 192.0.2.3 63741 typ host

server:

v=0
o=Mozilla-SIPUA-35.0.1 12458 0 IN IP4 0.0.0.0
s=SIP Call
t=0 0
a=ice-ufrag:962e89c1
a=ice-pwd:dab19e9a47489166445c5510b821fbb8
a=fingerprint:sha-256 27:90:2D:94:DF:07:3E:92:8D:D1:10:09:31:E0:8C:E5:04:57:2F:9D:A0:61:03:1A:72:E1:16:F2:8F:83:AE:0C
m=audio 9 RTP/SAVPF 109 101
c=IN IP4 0.0.0.0
a=rtpmap:109 opus/48000/2
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=inactive
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=setup:active
a=rtcp-mux
a=candidate:0 1 UDP 2130379007 192.0.2.15 50622 typ host
a=candidate:1 1 UDP 2128609535 192.0.2.3 57261 typ host
a=candidate:0 2 UDP 2130379006 192.0.2.15 51843 typ host
a=candidate:1 2 UDP 2128609534 192.0.2.3 58047 typ host
m=video 9 RTP/SAVPF 126
c=IN IP4 0.0.0.0
a=rtpmap:126 H264/90000
a=fmtp:126 profile-level-id=42e01f;packetization-mode=1
a=sendrecv
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 ccm fir
a=setup:active
a=rtcp-mux
a=candidate:0 1 UDP 2130379007 192.0.2.15 49859 typ host
a=candidate:1 1 UDP 2128609535 192.0.2.3 50476 typ host
a=candidate:0 2 UDP 2130379006 192.0.2.15 50686 typ host
a=candidate:1 2 UDP 2128609534 192.0.2.3 52719 typ host

SRTP

  • SRTP の Payload type が DynamicRTP-Type で 126 (ここでは H264/90000) になっている事を確認した
  • 音声は G722 が選択されている、これはとくに問題なさそう
  • H264/G722 な動画が流れる事になる
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment