I configured the predefined [1234] room in the videoroom sample as H.264 only (using videocodec = h264). (I did no other changes except basic necessities for general working setup.)
This makes video playing in Safari 11. Publishing videos from Chrome on Windows also works. However I'm not able to publish H.264 video from Chrome on Android (to Chrome on Windows or another Android device). I tried various devices (Samsung S4/S7, Nexus 5X) and versions of Chrome for Android (stable 61 to Canary 63).
I found some mentions of issues with H.264 in Chrome in #478, but it seems to be working, except for Android versions of Chrome.
I found reported Chrome issue H.264 can not be decoded when there are multiple video streams but disabling the localvideo playback (by commenting out Janus.attachMediaStream($('#myvideo').get(0), stream);) didn't help. (I guess there is always the publishing stream and the other streams... but again, Chrome on Android shows both local and subscribed stream from Chrome on Windows.)
JS log
13:09:34.858 janus.js:200 Initializing library
13:09:35.109 jquery.min.js:2 [Violation] 'DOMContentLoaded' handler took 350ms
13:09:35.118 [Violation] Forced reflow while executing JavaScript took 78ms
13:09:43.421 janus.js:314 Library initialized: true
13:09:43.423 janus.js:341 Using REST API to contact Janus: https://sandbox.example.com:8089/janus
13:09:43.512 janus.js:698 {janus: "success", transaction: "ck2FGq6XV6sn", data: {…}}
13:09:43.546 janus.js:706 Created session: 4069231558162760
13:09:43.550 janus.js:394 Long poll...
13:09:43.632 janus.js:946 {janus: "success", session_id: 4069231558162760, transaction: "csnKw77nw0pM", data: {…}}
13:09:43.636 janus.js:953 Created handle: 5097916652576436
13:09:43.644 videoroomtest.js:96 Plugin attached! (janus.plugin.videoroom, id=5097916652576436)
13:09:43.646 videoroomtest.js:97 -- This is a publisher/manager
13:09:49.368 janus.js:1045 Sending message to plugin (handle=5097916652576436):
13:09:49.371 janus.js:1046 {janus: "message", body: {…}, transaction: "PnAltNinNn0f"}
13:09:49.503 janus.js:1088 Message sent!
13:09:49.507 janus.js:1089 {janus: "ack", session_id: 4069231558162760, transaction: "PnAltNinNn0f"}
13:09:49.554 janus.js:560 Got a plugin event on session 4069231558162760
13:09:49.556 janus.js:561 {janus: "event", session_id: 4069231558162760, sender: 5097916652576436, transaction: "PnAltNinNn0f", plugindata: {…}}
13:09:49.563 janus.js:572 -- Event is coming from 5097916652576436 (janus.plugin.videoroom)
13:09:49.566 janus.js:574 {videoroom: "joined", room: 1234, description: "Demo Room", id: 7631913032568243, private_id: 1024115749, …}
13:09:49.571 janus.js:587 Notifying application...
13:09:49.580 videoroomtest.js:154 ::: Got a message (publisher) :::
13:09:49.582 videoroomtest.js:155 {videoroom: "joined", room: 1234, description: "Demo Room", id: 7631913032568243, private_id: 1024115749, …}
13:09:49.589 videoroomtest.js:157 Event: joined
13:09:49.595 videoroomtest.js:163 Successfully joined room 1234 with ID 7631913032568243
13:09:49.604 janus.js:2498 isTrickleEnabled: undefined
13:09:49.611 janus.js:2421 isAudioSendEnabled: {audioRecv: false, videoRecv: false, audioSend: true, videoSend: true}
13:09:49.616 videoroomtest.js:114 Consent dialog should be on now
13:09:49.723 janus.js:2421 isAudioSendEnabled: {audioRecv: false, videoRecv: false, audioSend: true, videoSend: true}
13:09:49.730 janus.js:2454 isVideoSendEnabled: {audioRecv: false, videoRecv: false, audioSend: true, videoSend: true}
13:09:49.737 videoroomtest.js:168 Got a list of available publishers/feeds:
13:09:49.739 videoroomtest.js:169 [{…}]
13:09:49.747 videoroomtest.js:175 >> [6218335602929897] 5X (audio: opus, video: h264)
13:09:49.822 janus.js:2421 isAudioSendEnabled: {audioRecv: false, videoRecv: false, audioSend: true, videoSend: true}
13:09:49.827 janus.js:2454 isVideoSendEnabled: {audioRecv: false, videoRecv: false, audioSend: true, videoSend: true}
13:09:49.835 janus.js:2432 isAudioSendRequired: {audioRecv: false, videoRecv: false, audioSend: true, videoSend: true}
13:09:49.839 janus.js:2465 isVideoSendRequired: {audioRecv: false, videoRecv: false, audioSend: true, videoSend: true}
13:09:49.855 janus.js:394 Long poll...
13:09:49.891 janus.js:946 {janus: "success", session_id: 4069231558162760, transaction: "BsMR1oHHPPyi", data: {…}}
13:09:49.896 janus.js:953 Created handle: 6643335597855806
13:09:49.899 videoroomtest.js:445 Plugin attached! (janus.plugin.videoroom, id=6643335597855806)
13:09:49.902 videoroomtest.js:446 -- This is a subscriber
13:09:49.908 janus.js:1045 Sending message to plugin (handle=6643335597855806):
13:09:49.911 janus.js:1046 {janus: "message", body: {…}, transaction: "FtcC0t4emcXo"}
13:09:49.994 janus.js:1088 Message sent!
13:09:50.002 janus.js:1089 {janus: "ack", session_id: 4069231558162760, transaction: "FtcC0t4emcXo"}
13:09:50.067 janus.js:560 Got a plugin event on session 4069231558162760
13:09:50.075 janus.js:561 {janus: "event", session_id: 4069231558162760, sender: 6643335597855806, transaction: "FtcC0t4emcXo", plugindata: {…}, …}
13:09:50.088 janus.js:572 -- Event is coming from 6643335597855806 (janus.plugin.videoroom)
13:09:50.096 janus.js:574 {videoroom: "attached", room: 1234, id: 6218335602929897, display: "5X"}
13:09:50.101 janus.js:582 Handling SDP as well...
13:09:50.108 janus.js:583 {type: "offer", sdp: "v=0
↵o=- 1507201782768267 1 IN IP4 51.15.XXX.YYY
↵….15.XXX.YYY 44646 typ host
↵a=end-of-candidates
↵"}
13:09:50.112 janus.js:587 Notifying application...
13:09:50.117 videoroomtest.js:465 ::: Got a message (listener) :::
13:09:50.120 videoroomtest.js:466 {videoroom: "attached", room: 1234, id: 6218335602929897, display: "5X"}
13:09:50.125 videoroomtest.js:468 Event: attached
13:09:50.170 videoroomtest.js:489 Successfully attached to feed 6218335602929897 (5X) in room 1234
13:09:50.187 videoroomtest.js:509 Handling SDP as well...
13:09:50.190 videoroomtest.js:510 {type: "offer", sdp: "v=0
↵o=- 1507201782768267 1 IN IP4 51.15.XXX.YYY
↵….15.XXX.YYY 44646 typ host
↵a=end-of-candidates
↵"}
13:09:50.194 janus.js:2498 isTrickleEnabled: undefined
13:09:50.196 janus.js:2421 isAudioSendEnabled: {audioSend: false, videoSend: false}
13:09:50.200 janus.js:2454 isVideoSendEnabled: {audioSend: false, videoSend: false}
13:09:50.208 janus.js:1305 streamsDone: undefined
13:09:50.211 janus.js:1321 Creating PeerConnection
13:09:50.213 janus.js:1322 {optional: Array(1)}
13:09:50.232 janus.js:1324 RTCPeerConnection {remoteDescription: RTCSessionDescription, signalingState: "stable", iceGatheringState: "new", iceConnectionState: "new", onnegotiationneeded: null, …}
13:09:50.240 janus.js:1329 Preparing local SDP and gathering candidates (trickle=true)
13:09:50.245 janus.js:2487 isDataEnabled: {audioSend: false, videoSend: false}
13:09:50.268 janus.js:394 Long poll...
13:09:50.401 janus.js:1405 Remote description accepted!
13:09:50.405 janus.js:1881 Creating answer (iceDone=false)
13:09:50.407 janus.js:2443 isAudioRecvEnabled: {audioSend: false, videoSend: false}
13:09:50.411 janus.js:2476 isVideoRecvEnabled: {audioSend: false, videoSend: false}
13:09:50.414 janus.js:1899 {mandatory: {…}}
13:09:50.417 janus.js:2454 isVideoSendEnabled: {audioSend: false, videoSend: false}
13:09:50.429 janus.js:1366 Handling Remote Track
13:09:50.430 janus.js:1367 Event {isTrusted: false, track: MediaStreamTrack, receiver: RTCRtpReceiver, transceiver: {…}, streams: Array(1), …}
13:09:50.436 videoroomtest.js:538 Remote feed #1
13:09:50.462 janus.js:1366 Handling Remote Track
13:09:50.463 janus.js:1367 Event {isTrusted: false, track: MediaStreamTrack, receiver: RTCRtpReceiver, transceiver: {…}, streams: Array(1), …}
13:09:50.466 videoroomtest.js:538 Remote feed #1
13:09:50.471 janus.js:1917 RTCSessionDescription {type: "answer", sdp: "v=0
↵o=- 461084450096899560 2 IN IP4 127.0.0.1
↵s=…07 packetization-mode=1;profile-level-id=42e01f
↵"}
13:09:50.474 janus.js:1919 Setting local description
13:09:50.479 videoroomtest.js:519 Got SDP!
13:09:50.480 videoroomtest.js:520 {type: "answer", sdp: "v=0
↵o=- 461084450096899560 2 IN IP4 127.0.0.1
↵s=…07 packetization-mode=1;profile-level-id=42e01f
↵"}
13:09:50.484 janus.js:1045 Sending message to plugin (handle=6643335597855806):
13:09:50.485 janus.js:1046 {janus: "message", body: {…}, transaction: "w0n8hNOk8eYY", jsep: {…}}
13:09:50.535 janus.js:1135 Sending trickle candidate (handle=6643335597855806):
13:09:50.537 janus.js:1136 {janus: "trickle", candidate: {…}, transaction: "c680iHTOlrHw"}
13:09:50.554 videoroomtest.js:114 Consent dialog should be off now
13:09:50.613 janus.js:1305 streamsDone: MediaStream {id: "vKKKeroOmatZh656eoTiB9PBpk2VfeROtuM3", active: true, onaddtrack: null, onremovetrack: null, onactive: null, …}
13:09:50.620 janus.js:1321 Creating PeerConnection
13:09:50.622 janus.js:1322 {optional: Array(1)}
13:09:50.632 janus.js:1324 RTCPeerConnection {remoteDescription: RTCSessionDescription, signalingState: "stable", iceGatheringState: "new", iceConnectionState: "new", onnegotiationneeded: null, …}
13:09:50.637 janus.js:1329 Preparing local SDP and gathering candidates (trickle=true)
13:09:50.647 janus.js:1361 Adding local stream
13:09:50.675 videoroomtest.js:281 ::: Got a local stream :::
13:09:50.677 videoroomtest.js:283 MediaStream {id: "vKKKeroOmatZh656eoTiB9PBpk2VfeROtuM3", active: true, onaddtrack: null, onremovetrack: null, onactive: null, …}
13:09:50.819 janus.js:2487 isDataEnabled: {audioRecv: false, videoRecv: false, audioSend: true, videoSend: true}
13:09:50.831 janus.js:1793 Creating offer (iceDone=false)
13:09:50.835 janus.js:2443 isAudioRecvEnabled: {audioRecv: false, videoRecv: false, audioSend: true, videoSend: true}
13:09:50.841 janus.js:2476 isVideoRecvEnabled: {audioRecv: false, videoRecv: false, audioSend: true, videoSend: true}
13:09:50.852 janus.js:1812 {mandatory: {…}}
13:09:50.858 janus.js:2454 isVideoSendEnabled: {audioRecv: false, videoRecv: false, audioSend: true, videoSend: true}
13:09:50.945 janus.js:1830 RTCSessionDescription {type: "offer", sdp: "v=0
↵o=- 104216082731489011 2 IN IP4 127.0.0.1
↵s=…2092 label:58bb611c-d4f7-47bc-a7bf-b01369712dbd
↵"}
13:09:50.948 janus.js:1832 Setting local description
13:09:50.955 janus.js:1854 Offer ready
13:09:50.958 janus.js:1855 {media: {…}, simulcast: false, success: ƒ, error: ƒ}
13:09:50.968 videoroomtest.js:400 Got publisher SDP!
13:09:50.969 videoroomtest.js:401 {type: "offer", sdp: "v=0
↵o=- 104216082731489011 2 IN IP4 127.0.0.1
↵s=…2092 label:58bb611c-d4f7-47bc-a7bf-b01369712dbd
↵"}
13:09:50.971 janus.js:1045 Sending message to plugin (handle=5097916652576436):
13:09:50.972 janus.js:1046 {janus: "message", body: {…}, transaction: "3LW49pOGv9gz", jsep: {…}}
13:09:50.994 janus.js:1088 Message sent!
13:09:50.995 janus.js:1089 {janus: "ack", session_id: 4069231558162760, transaction: "w0n8hNOk8eYY"}
13:09:51.000 janus.js:1337 End of candidates.
13:09:51.001 janus.js:1135 Sending trickle candidate (handle=6643335597855806):
13:09:51.002 janus.js:1136 {janus: "trickle", candidate: {…}, transaction: "SUuaxWFg5yb0"}
13:09:51.035 janus.js:1148 Candidate sent!
13:09:51.038 janus.js:1149 {janus: "ack", session_id: 4069231558162760, transaction: "c680iHTOlrHw"}
13:09:51.046 janus.js:560 Got a plugin event on session 4069231558162760
13:09:51.049 janus.js:561 {janus: "event", session_id: 4069231558162760, sender: 6643335597855806, transaction: "w0n8hNOk8eYY", plugindata: {…}}
13:09:51.053 janus.js:572 -- Event is coming from 6643335597855806 (janus.plugin.videoroom)
13:09:51.055 janus.js:574 {videoroom: "event", room: 1234, started: "ok"}
13:09:51.061 janus.js:587 Notifying application...
13:09:51.064 videoroomtest.js:465 ::: Got a message (listener) :::
13:09:51.068 videoroomtest.js:466 {videoroom: "event", room: 1234, started: "ok"}
13:09:51.074 videoroomtest.js:468 Event: event
13:09:51.143 janus.js:1135 Sending trickle candidate (handle=5097916652576436):
13:09:51.144 janus.js:1136 {janus: "trickle", candidate: {…}, transaction: "lAyavk3ecPZU"}
13:09:51.152 janus.js:1135 Sending trickle candidate (handle=5097916652576436):
13:09:51.154 janus.js:1136 {janus: "trickle", candidate: {…}, transaction: "w18uB8f0VWHU"}
13:09:51.166 janus.js:1135 Sending trickle candidate (handle=5097916652576436):
13:09:51.168 janus.js:1136 {janus: "trickle", candidate: {…}, transaction: "41FPnf67SDAt"}
13:09:51.177 janus.js:1135 Sending trickle candidate (handle=5097916652576436):
13:09:51.179 janus.js:1136 {janus: "trickle", candidate: {…}, transaction: "MJG4dlCtamp5"}
13:09:51.193 janus.js:1088 Message sent!
13:09:51.195 janus.js:1089 {janus: "ack", session_id: 4069231558162760, transaction: "3LW49pOGv9gz"}
13:09:51.228 janus.js:1148 Candidate sent!
13:09:51.229 janus.js:1149 {janus: "ack", session_id: 4069231558162760, transaction: "SUuaxWFg5yb0"}
13:09:51.236 janus.js:1135 Sending trickle candidate (handle=5097916652576436):
13:09:51.237 janus.js:1136 {janus: "trickle", candidate: {…}, transaction: "sIp5flrIcvUc"}
13:09:51.248 janus.js:1135 Sending trickle candidate (handle=5097916652576436):
13:09:51.250 janus.js:1136 {janus: "trickle", candidate: {…}, transaction: "664huPlWEtsf"}
13:09:51.260 janus.js:1337 End of candidates.
13:09:51.261 janus.js:1135 Sending trickle candidate (handle=5097916652576436):
13:09:51.268 janus.js:1136 {janus: "trickle", candidate: {…}, transaction: "EEui1GtU52zN"}
13:09:51.308 janus.js:394 Long poll...
13:09:51.317 janus.js:1148 Candidate sent!
13:09:51.320 janus.js:1149 {janus: "ack", session_id: 4069231558162760, transaction: "lAyavk3ecPZU"}
13:09:51.324 janus.js:1148 Candidate sent!
13:09:51.326 janus.js:1149 {janus: "ack", session_id: 4069231558162760, transaction: "w18uB8f0VWHU"}
13:09:51.347 janus.js:1148 Candidate sent!
13:09:51.348 janus.js:1149 {janus: "ack", session_id: 4069231558162760, transaction: "41FPnf67SDAt"}
13:09:51.353 janus.js:1148 Candidate sent!
13:09:51.356 janus.js:1149 {janus: "ack", session_id: 4069231558162760, transaction: "MJG4dlCtamp5"}
13:09:51.403 janus.js:1148 Candidate sent!
13:09:51.405 janus.js:1149 {janus: "ack", session_id: 4069231558162760, transaction: "sIp5flrIcvUc"}
13:09:51.409 janus.js:1148 Candidate sent!
13:09:51.410 janus.js:1149 {janus: "ack", session_id: 4069231558162760, transaction: "664huPlWEtsf"}
13:09:51.441 janus.js:1148 Candidate sent!
13:09:51.443 janus.js:1149 {janus: "ack", session_id: 4069231558162760, transaction: "EEui1GtU52zN"}
13:09:51.463 janus.js:469 Got a webrtcup event on session 4069231558162760
13:09:51.468 janus.js:470 {janus: "webrtcup", session_id: 4069231558162760, sender: 6643335597855806}
13:09:51.476 videoroomtest.js:532 Janus says this WebRTC PeerConnection (feed #1) is up now
13:09:51.483 janus.js:2111 Starting bitrate timer (via getStats)
13:09:51.663 janus.js:394 Long poll...
13:09:51.749 janus.js:560 Got a plugin event on session 4069231558162760
13:09:51.756 janus.js:561 {janus: "event", session_id: 4069231558162760, sender: 5097916652576436, transaction: "3LW49pOGv9gz", plugindata: {…}, …}
13:09:51.766 janus.js:572 -- Event is coming from 5097916652576436 (janus.plugin.videoroom)
13:09:51.769 janus.js:574 {videoroom: "event", room: 1234, configured: "ok", audio_codec: "opus", video_codec: "h264"}
13:09:51.787 janus.js:582 Handling SDP as well...
13:09:51.798 janus.js:583 {type: "answer", sdp: "v=0
↵o=- 104216082731489011 2 IN IP4 51.15.XXX.YYY….15.XXX.YYY 60019 typ host
↵a=end-of-candidates
↵"}
13:09:51.804 janus.js:587 Notifying application...
13:09:51.807 videoroomtest.js:154 ::: Got a message (publisher) :::
13:09:51.810 videoroomtest.js:155 {videoroom: "event", room: 1234, configured: "ok", audio_codec: "opus", video_codec: "h264"}
13:09:51.816 videoroomtest.js:157 Event: event
13:09:51.820 videoroomtest.js:256 Handling SDP as well...
13:09:51.824 videoroomtest.js:257 {type: "answer", sdp: "v=0
↵o=- 104216082731489011 2 IN IP4 51.15.XXX.YYY….15.XXX.YYY 60019 typ host
↵a=end-of-candidates
↵"}
13:09:51.861 janus.js:1771 Remote description accepted!
13:09:51.950 janus.js:394 Long poll...
13:09:54.457 janus.js:469 Got a webrtcup event on session 4069231558162760
13:09:54.468 janus.js:470 {janus: "webrtcup", session_id: 4069231558162760, sender: 5097916652576436}
13:09:54.484 videoroomtest.js:136 Janus says our WebRTC PeerConnection is up now
13:09:54.688 janus.js:394 Long poll...
13:09:54.833 janus.js:518 Got a media event on session 4069231558162760
13:09:54.838 janus.js:519 {janus: "media", session_id: 4069231558162760, sender: 5097916652576436, type: "audio", receiving: true}
13:09:54.850 videoroomtest.js:133 Janus started receiving our audio
13:09:55.033 janus.js:394 Long poll...
13:09:55.136 janus.js:518 Got a media event on session 4069231558162760
13:09:55.143 janus.js:519 {janus: "media", session_id: 4069231558162760, sender: 5097916652576436, type: "video", receiving: true}
13:09:55.153 videoroomtest.js:133 Janus started receiving our video
13:09:55.337 janus.js:394 Long poll...
13:10:25.451 janus.js:439 Got a keepalive on session 4069231558162760
13:10:25.650 janus.js:394 Long poll...
Just wanted to add that I have the exact same experience, also when using the streaming plugin to stream a constrained baseline h264 stream (which works on chrome & firefox for linux/macos/windows and safari).
Chrome for Android does not support H264 software encoding
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/rsokc4bi8R4
You should still be able to cam up in a H264 room using a phone that has H264 hardware encoding
Please star this issue to show interest for software encoding to be added to Android https://bugs.chromium.org/p/chromium/issues/detail?id=719023
Why not tell Safari to implement VP8 instead? :P
Il 06 ott 2017 7:00 AM, "MvEerd" notifications@github.com ha scritto:
Chrome for Android does support H264 software encoding
https://groups.google.com/a/chromium.org/forum/#!topic/
blink-dev/rsokc4bi8R4
You should still be able to cam up in a H264 room using a phone that has
H264 hardware encodingPlease star this issue to show interest for this to be added
https://bugs.chromium.org/p/chromium/issues/detail?id=719023—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/meetecho/janus-gateway/issues/1017#issuecomment-334724234,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADg5vBmTYYNS2B7spDIg7nqZk4wD4-JEks5spgg5gaJpZM4PvK1A
.
That would be the nicer option indeed but they seem more stubborn and have more to gain from H.264 on their hardware so I was betting on Google
For reference;
https://bugs.webkit.org/show_bug.cgi?id=173141
My understanding is that Android (H.264 profiles based on Android version) supports H.264 encoding (https://developer.android.com/guide/topics/media/media-formats.html) but I guess Chrome does not...
Why not tell Safari to implement VP8 instead? :P
Adding support for the VP8 codec in Safari will not solve the problem of the lack of H.264 in Chrome on Android.
There are a lot of equipment (IP cameras, NVR recorders, etc) that can only give H.264 and Chrome must be able to decode this video.
Now we recommend all our clients to use Firefox on Android for WebRTC, they have a working H.264 software decoder.
I hope in the future we will be able to recommend using Chrome on Android for WebRTC
I don't see anything in here that seems to suggest an issue in Janus itself. Seems very much browser related, so closing this issue and please continue the discussion on our Google group instead.
Try again with Chrome for Android Beta or Dev (v65 and v66 as of this writing). I believe the H.264 encoder should be working.
@Nicholi just tested with Chrome Beta (65) and it worked, thanks.
@c0bra Hi. Can I ask you to share the configuration you used (encoding pipeline, janus configuration)?
@mattdibi it's been a while, but I think I was just testing the demo
@c0bra Thanks for your answer. The streaming demo is VP8/Opus encoded, not h264. Are you referring to anothed demo?
@Nicholi I don't think https://bugs.chromium.org/p/chromium/issues/detail?id=719023 has actually landed in Chrome yet. The recent comments on the issue suggest that it's still open, and my own test as detailed below also illustrates this.
I've got two Android devices, exact same Chrome build (66.0.3359.158), exact same Android version (7.0.0), and a video room set to h264 works on one device and not the other. On the device that does not work, I get the following output from Janus:
[WARN] Couldn't find codec we needed (h264) in the offer, rejecting video
My guess is that one device has hardware support, and so it works, and the other does not, and because the software h264 encoder hasn't landed yet, it fails.
Hi im new in janus and webRTC
i wanna stream video with h264 coding but dont know how to do that at all is there any help , that help me step by step?
I couldn't find any document that describe me how to do that.
Most helpful comment
Why not tell Safari to implement VP8 instead? :P
Il 06 ott 2017 7:00 AM, "MvEerd" notifications@github.com ha scritto: