H.264 in chromium browser

506 views
Skip to first unread message

Neil Young

unread,
Feb 27, 2019, 3:34:11 PM2/27/19
to discuss-webrtc
Hi,

in mangling of a good Java WebRTC library I'm trying to "abuse" a chromium browser instance as WebRTC workhorse. The Java app is only supposed to _receive_ video, so I didn't mess with getUserMedia and friends. The local SDP offer seems to not contain any H.264 format, which I find unfortunate, since my designated source is capable to deliver H.264 from hardware.

The offer created is like so:

v=0
o=- 6090734790764838631 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=msid-semantic: WMS
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 125 127
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:y5sQ
a=ice-pwd:dseSbjynGBAYpTX1SEL8dqS6
a=ice-options:trickle
a=fingerprint:sha-256 A3:61:97:6D:3F:60:D6:E6:F1:06:BA:DB:B3:BB:C6:62:10:55:0A:4C:8C:CE:77:D3:CC:C8:1F:C1:4A:AE:6D:4C
a=setup:actpass
a=mid:0
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:12 urn:3gpp:video-orientation
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=recvonly
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 VP9/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 profile-id=2
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:102 red/90000
a=rtpmap:125 rtx/90000
a=fmtp:125 apt=102
a=rtpmap:127 ulpfec/90000


Any chance to add H.264 support?

TIA

Neil Young

unread,
Feb 28, 2019, 1:47:55 PM2/28/19
to discuss-webrtc
Anybody having an answer here? I think I know, that Google does not support H.264, but I just need a confirmation and maybe somebody has an idea, if there is a way to work around.

Regards


Philipp Hancke

unread,
Feb 28, 2019, 2:19:46 PM2/28/19
to discuss...@googlegroups.com
Chrome supports H264. Chromium (on ubuntu at least) has included H264 for quite some time, then M65 did not:
This seems to have been working again after M65 (it is included in M71 for me) but the whole situation seemed to be rather muddy.


Am Do., 28. Feb. 2019 um 19:48 Uhr schrieb 'Neil Young' via discuss-webrtc <discuss...@googlegroups.com>:
Anybody having an answer here? I think I know, that Google does not support H.264, but I just need a confirmation and maybe somebody has an idea, if there is a way to work around.

Regards


--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/212a29c5-51f3-480a-9ea3-aa20cb5d3562%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Neil Young

unread,
Feb 28, 2019, 2:22:29 PM2/28/19
to discuss-webrtc
Thanks, Philipp. I fetched the latest version yesterday and tested it under macOS. At least the returned SDP indicates no H.264 support.

Grüsse

Neil Young

unread,
Feb 28, 2019, 3:06:27 PM2/28/19
to discuss-webrtc
Just downloaded 74.0.3721.0 from here https://chromium.woolyss.com/download/de/#mac

No H.264 on Mac. Testing Ubuntu later.

Offer from pc1
v=0
o=- 730688498891466898 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=msid-semantic: WMS
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 125 127
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Vg1I
a=ice-pwd:500W83KiAjFj7QYBWAwjHntt
a=ice-options:trickle
a=fingerprint:sha-256 C1:B9:02:02:E7:45:35:7B:5A:40:5D:7B:6D:1E:1C:A2:E2:28:30:EE:8A:19:E8:9A:8F:E2:FD:E3:F7:91:3A:64

Neil Young

unread,
Feb 28, 2019, 3:16:35 PM2/28/19
to discuss-webrtc
Hmm. Tested non-headless start of chromium and - tadaa: There is H.264. Makes sense to anybody?

Offer from pc1
v=0
o=- 5726222415313780525 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=msid-semantic: WMS
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 123 127 122 125 107 108 109 124
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:HRA+
a=ice-pwd:vFnmxEPdKiMeB4ACQVCe+nX/
a=ice-options:trickle
a=fingerprint:sha-256 F7:DE:23:7A:F6:6E:3F:D6:1B:99:86:81:72:C7:D1:9D:D6:86:77:BA:71:25:13:DA:0C:47:BB:01:CA:59:66:58
a=rtpmap:102 H264/90000
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=420032
a=rtpmap:123 rtx/90000
a=fmtp:123 apt=102
a=rtpmap:127 H264/90000
a=rtcp-fb:127 goog-remb
a=rtcp-fb:127 transport-cc
a=rtcp-fb:127 ccm fir
a=rtcp-fb:127 nack
a=rtcp-fb:127 nack pli
a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d0032
a=rtpmap:122 rtx/90000
a=fmtp:122 apt=127
a=rtpmap:125 H264/90000
a=rtcp-fb:125 goog-remb
a=rtcp-fb:125 transport-cc
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640032
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=125
a=rtpmap:108 red/90000
a=rtpmap:109 rtx/90000
a=fmtp:109 apt=108
a=rtpmap:124 ulpfec/90000


Command line was 

/Applications/Chromium.app/Contents/MacOS/Chromium --remote-debugging-port=9222 https://mydomain.com/myfile.html


Extra parameter --headless give the non-H.264 capable SDP

Strange

Neil Young

unread,
Feb 28, 2019, 3:24:05 PM2/28/19
to discuss-webrtc
OK, I think the issue is solved. Used Chrome instead of Chromium and it works, also in headless mode.

According to this source it is known: https://github.com/GoogleChrome/puppeteer/issues/2422

Willing to accept this without understanding it :)


Offer from pc1
v=0
o=- 3336172711360391171 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE video
a=msid-semantic: WMS
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 123 127 122 125 107 108 109 124
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:RZ49
a=ice-pwd:m75vqJchiWGcMyDWOA0/U7t1
a=ice-options:trickle
a=fingerprint:sha-256 8F:FD:E4:73:E6:20:E2:0A:B8:13:FE:09:45:86:76:74:13:68:97:C3:AB:85:43:F7:17:39:F5:DC:AE:DB:E3:2A
a=setup:actpass
a=mid:video
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:4 urn:3gpp:video-orientation
a=recvonly
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 H264/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:102 H264/90000
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f
a=rtpmap:123 rtx/90000
a=fmtp:123 apt=102
a=rtpmap:127 H264/90000
a=rtcp-fb:127 goog-remb
a=rtcp-fb:127 transport-cc
a=rtcp-fb:127 ccm fir
a=rtcp-fb:127 nack
a=rtcp-fb:127 nack pli
a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:122 rtx/90000
a=fmtp:122 apt=127
a=rtpmap:125 H264/90000
a=rtcp-fb:125 goog-remb
a=rtcp-fb:125 transport-cc
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=125
a=rtpmap:108 red/90000
a=rtpmap:109 rtx/90000
a=fmtp:109 apt=108
a=rtpmap:124 ulpfec/90000


ad...@norvi.net

unread,
Feb 28, 2019, 8:26:45 PM2/28/19
to discuss-webrtc
You have to pass specific commands into the compiler to get it to include h264 support.

For me, I pass these in.

is_official_build=true 
rtc_use_h264=true 
proprietary_codecs=true 
ffmpeg_branding=Chrome 
use_jumbo_build=true

Neil Young

unread,
Mar 1, 2019, 1:29:12 AM3/1/19
to discuss-webrtc
Thanks for the info. I didn’t compile from scratch, used one of the many pre-built versions around. In the link you provided is no trace regarding the special build flags. Would you please mind to elaborate?

Anyway. Meanwhile I’m going with Chrome in headless mode and everything works as expected.
Reply all
Reply to author
Forward
0 new messages