steep-balloon-41261
11/27/2023, 2:25 PMmagnificent-art-43333
11/27/2023, 2:54 PMadventurous-twilight-28575
11/27/2023, 3:03 PMeager-raincoat-52616
11/27/2023, 3:40 PMadventurous-twilight-28575
11/27/2023, 3:42 PMeager-raincoat-52616
11/27/2023, 3:44 PMadventurous-twilight-28575
11/27/2023, 3:45 PMeager-raincoat-52616
11/27/2023, 4:01 PMadventurous-twilight-28575
11/27/2023, 4:17 PM/home/ubuntu/AndroidStudioProjects/client-sdk-android/sample-app/src/main/AndroidManifest.xml: Error: When targeting Android 13 or higher, posting a permission requires holding the POST_NOTIFICATIONS permission (usage from leakcanary.NotificationEventListener) [NotificationPermission]
Explanation for issues of type "NotificationPermission":
When targeting Android 13 and higher, posting permissions requires holding
the runtime permission android.permission.POST_NOTIFICATIONS.
The full lint text report is located at:
/home/ubuntu/AndroidStudioProjects/client-sdk-android/sample-app/build/intermediates/lint_intermediate_text_report/debug/lint-results-debug.txtadventurous-twilight-28575
11/27/2023, 4:26 PMadventurous-twilight-28575
11/27/2023, 4:33 PMadventurous-twilight-28575
11/27/2023, 4:39 PMadventurous-twilight-28575
11/27/2023, 5:16 PMroom.videoTrackPublishDefaults = room.videoTrackPublishDefaults.copy(videoCodec = "h264")
it doesn't even offer any video in the sent OFFER.
Then I changed to my old Nexus 6P (Android 8.1), form which I know for sure that it supports H.264 hardware encoding out of the box, even with the oldest M8x libwebrtc. Unfortunately the same result: VP8 yes, H.264 no.
I just hope to have made a mistake in selecting the desired coded, otherwise this doesn't work for me.adventurous-twilight-28575
11/27/2023, 5:32 PMadventurous-twilight-28575
11/27/2023, 5:39 PMdry-elephant-14928
11/28/2023, 1:38 AMadventurous-twilight-28575
11/28/2023, 7:38 AMadventurous-twilight-28575
11/28/2023, 8:11 AMroom.videoTrackPublishDefaults = room.videoTrackPublishDefaults.copy(videoCodec = "h264", simulcast = false)
// Connect to server.
room.connect(
url,
token,
options = ConnectOptions(autoSubscribe = false, audio = false)
)
I thought with "audio=false" I would also get rid of any audio parameters in offer and answer, but that was not the case. Audio was offered.
The result was a video, which visibly ramped up in resolution. But it was no simulcast. I think, this is the normal behaviour of libwebrtc codecs, at least for H.264 observed many times. It finally landed at 544x960 @ 25fps (portrait). That doesn't speak for a hardware codec (or I missed some way to enable 720p @ 30fps), even though the codec signature in the Android traces looks like hardware codec for me:
I/OplusFeedbackInfo: 0xb40000729bfdf200 c2.mtk.avc.encoder 544x960 inputFps=25 outputFps=25 renderFps=0, discardFps=25adventurous-twilight-28575
11/28/2023, 8:15 AMcandidates except my local network for privacy.
There was also some more back and forth with offers and answers, I hope I was checking the right ones, video related:
OFFER from Android
v=0
o=- 3856291409814067501 3 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1 2
a=extmap-allow-mixed
a=msid-semantic:WMS PA_JVc9WdMfdXE7
m=audio 58931 UDP/TLS/RTP/SAVPF 111 63 9 102 0 8 13 110 126
c=IN IP4 192.168.188.33
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:3010281474 1 udp 2122194687 192.168.188.33 58931 typ host generation 0 network-id 3 network-cost 10
a=ice-ufrag:BEhm
a=ice-pwd:NCTvcGDqJ2smVL/+/eiwJSjs
a=ice-options:trickle renomination
a=fingerprint:sha-256 B0:7B:29:83:09:45:EC:F0:7A:4E:FB:2E:4C:E4:09:F4:A6:B7:76:50:4F:4D:02:07:A5:26:C4:45:4E:1B:A5:53
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 <http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time>
a=extmap:3 <http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01>
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendonly
a=msid:PA_JVc9WdMfdXE7 087dfd65-45cb-49fc-87de-a047356171ad
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:63 red/48000/2
a=fmtp:63 111/111
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:126 telephone-event/8000
a=ssrc:1484863682 cname:bQGemKAtMYo57Gx9
a=ssrc:1484863682 msid:PA_JVc9WdMfdXE7 087dfd65-45cb-49fc-87de-a047356171ad
m=application 48223 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 192.168.188.33
a=candidate:3010281474 1 udp 2122194687 192.168.188.33 48223 typ host generation 0 network-id 3 network-cost 10
a=ice-ufrag:BEhm
a=ice-pwd:NCTvcGDqJ2smVL/+/eiwJSjs
a=ice-options:trickle renomination
a=fingerprint:sha-256 B0:7B:29:83:09:45:EC:F0:7A:4E:FB:2E:4C:E4:09:F4:A6:B7:76:50:4F:4D:02:07:A5:26:C4:45:4E:1B:A5:53
a=setup:actpass
a=mid:1
a=sctp-port:5000
a=max-message-size:262144
m=video 9 UDP/TLS/RTP/SAVPF 127 103 127 103 104 105 96 97 39 40 98 99 104 105 106 107 108
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:BEhm
a=ice-pwd:NCTvcGDqJ2smVL/+/eiwJSjs
a=ice-options:trickle renomination
a=fingerprint:sha-256 B0:7B:29:83:09:45:EC:F0:7A:4E:FB:2E:4C:E4:09:F4:A6:B7:76:50:4F:4D:02:07:A5:26:C4:45:4E:1B:A5:53
a=setup:actpass
a=mid:2
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 <http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time>
a=extmap:13 urn:3gpp:video-orientation
a=extmap:3 <http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01>
a=extmap:5 <http://www.webrtc.org/experiments/rtp-hdrext/playout-delay>
a=extmap:6 <http://www.webrtc.org/experiments/rtp-hdrext/video-content-type>
a=extmap:7 <http://www.webrtc.org/experiments/rtp-hdrext/video-timing>
a=extmap:8 <http://www.webrtc.org/experiments/rtp-hdrext/color-space>
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=extmap:12 <https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension>
a=sendonly
a=msid:PA_JVc9WdMfdXE7 614c6f17-1359-4ae7-9713-c558fdc3e25c
a=rtcp-mux
a=rtcp-rsize
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:103 rtx/90000
a=fmtp:103 apt=127
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:103 rtx/90000
a=fmtp:103 apt=127
a=rtpmap:104 H265/90000
a=rtcp-fb:104 goog-remb
a=rtcp-fb:104 transport-cc
a=rtcp-fb:104 ccm fir
a=rtcp-fb:104 nack
a=rtcp-fb:104 nack pli
a=rtpmap:105 rtx/90000
a=fmtp:105 apt=104
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:39 AV1/90000
a=rtcp-fb:39 goog-remb
a=rtcp-fb:39 transport-cc
a=rtcp-fb:39 ccm fir
a=rtcp-fb:39 nack
a=rtcp-fb:39 nack pli
a=rtpmap:40 rtx/90000
a=fmtp:40 apt=39
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:104 H265/90000
a=rtcp-fb:104 goog-remb
a=rtcp-fb:104 transport-cc
a=rtcp-fb:104 ccm fir
a=rtcp-fb:104 nack
a=rtcp-fb:104 nack pli
a=rtpmap:105 rtx/90000
a=fmtp:105 apt=104
a=rtpmap:106 red/90000
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=106
a=rtpmap:108 ulpfec/90000
a=ssrc-group:FID 1263303468 4291335920
a=ssrc:1263303468 cname:bQGemKAtMYo57Gx9
a=ssrc:1263303468 msid:PA_JVc9WdMfdXE7 614c6f17-1359-4ae7-9713-c558fdc3e25c
a=ssrc:4291335920 cname:bQGemKAtMYo57Gx9
a=ssrc:4291335920 msid:PA_JVc9WdMfdXE7 614c6f17-1359-4ae7-9713-c558fdc3e25c
ANSWER from server:
v=0
o=- 7738754379143647972 1701157906 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 CF:C8:C3:78:25:97:ED:C7:F3:E7:31:B1:C2:69:41:27:D9:20:13:66:73:E0:20:97:03:D1:87:05:55:AC:20:75
a=extmap-allow-mixed
a=group:BUNDLE 0 1 2
m=audio 9 UDP/TLS/RTP/SAVPF 63 111
c=IN IP4 0.0.0.0
a=setup:active
a=mid:0
a=ice-ufrag:chaUbTCluAOsCwSJ
a=ice-pwd:rnhSZQkCKpGsRXqGuLwVsnQIolzmIySX
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:63 red/48000/2
a=fmtp:63 111/111
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10;useinbandfec=1;usedtx=1
a=rtcp-fb:111 transport-cc
a=rtcp-fb:111 nack
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=recvonly
a=candidate:2994961013 1 udp 2130706431 192.168.188.88 7882 typ host
a=end-of-candidates
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=setup:active
a=mid:1
a=sendrecv
a=sctp-port:5000
a=ice-ufrag:chaUbTCluAOsCwSJ
a=ice-pwd:rnhSZQkCKpGsRXqGuLwVsnQIolzmIySX
m=video 9 UDP/TLS/RTP/SAVPF 127 127 96 39 98
c=IN IP4 0.0.0.0
a=setup:active
a=mid:2
a=ice-ufrag:chaUbTCluAOsCwSJ
a=ice-pwd:rnhSZQkCKpGsRXqGuLwVsnQIolzmIySX
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:127 H264/90000
a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
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=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=rtpmap:127 H264/90000
a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
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=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=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:39 AV1/90000
a=rtcp-fb:39 goog-remb
a=rtcp-fb:39 transport-cc
a=rtcp-fb:39 ccm fir
a=rtcp-fb:39 nack
a=rtcp-fb:39 nack pli
a=rtpmap:98 VP9/90000
a=fmtp:98 profile-id=0
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=extmap:3 <http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01>
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=recvonly
Going to check VP8 simulcast now for frame rate and resolutionadventurous-twilight-28575
11/28/2023, 8:28 AMadventurous-twilight-28575
11/28/2023, 8:29 AMadventurous-twilight-28575
11/28/2023, 8:39 AMadventurous-twilight-28575
11/28/2023, 4:18 PMadventurous-twilight-28575
11/30/2023, 1:22 PMadventurous-twilight-28575
11/30/2023, 6:59 PMdry-elephant-14928
12/01/2023, 5:06 AMeager-raincoat-52616
12/01/2023, 7:18 AMvideoTrackCaptureDefaults when creating the room like so:
val room = LiveKit.create(
appContext = application,
options = RoomOptions(
videoTrackCaptureDefaults = LocalVideoTrackOptions(
captureParams = VideoPreset169.H720.capture
// or pass in your own values
// captureParams = VideoCaptureParameter(1280, 720, 30)
)
),
)adventurous-twilight-28575
12/01/2023, 8:12 AMroomOptions element in the room.connect function. Hoping it is correct.
PS: But I know libwebrtc sometimes has its own opinion about encoding resolutions. Let me cross check this with my MS Android client.eager-raincoat-52616
12/01/2023, 8:15 AMLiveKit.create function, I think that roomOptions parameter was exposed on accident and won’t correctly reflect the capture params set thereadventurous-twilight-28575
12/01/2023, 8:27 AMLiveKit.create function, I think that roomOptions parameter was exposed on accident and won’t correctly reflect the capture params set there
OK, will try that later and reportadventurous-twilight-28575
12/01/2023, 8:28 AMadventurous-twilight-28575
12/01/2023, 10:26 AM> try setting it in theYes, this is working finally. 720x1280 (portrait) 30 fps for both. H.264 frame rate decreases dramatically to 20 fps if there is some complexity in the image (not so VP8), but I see that coming from the encoder already. Good so far. Now simulcast for both 🙂 I know it's been working for VP8. For H.264 the hardware codec seems to be used (in contrary to what has been said earlier), but the results are bull...t.function, I think thatLiveKit.createparameter was exposed on accident and won’t correctly reflect the capture params set thereroomOptions
I/OplusFeedbackInfo: 0xb4000076159e2c00 c2.mtk.avc.encoder 90x160 inputFps=1 outputFps=1 renderFps=0, discardFps=1
I/OplusFeedbackInfo: 0xb4000076381a3e00 c2.mtk.avc.encoder 720x1280 inputFps=1 outputFps=1 renderFps=0, discardFps=1
I/OplusFeedbackInfo: 0xb4000076d3da3e00 c2.mtk.avc.encoder 180x320 inputFps=1 outputFps=1 renderFps=0, discardFps=1adventurous-twilight-28575
12/01/2023, 10:27 AMlibwebrtc by myself?eager-raincoat-52616
12/01/2023, 10:32 AMadventurous-twilight-28575
12/01/2023, 10:38 AM./tools_webrtc/android/build_aar.py --extra-gn-args 'is_debug=false is_component_build=false is_clang=true rtc_include_tests=false rtc_use_h264=true rtc_enable_protobuf=false use_rtti=true use_custom_libcxx=true ffmpeg_branding="Chrome"' --build-dir ./out/release-build/
I was trying my Nexus 6P, form which I definitely know, that it supports HW H.264 non-simulcast encoding with 720p@30fps. I'm not getting more than 13 fps on the far end.
(I'm sorry, all my messages leave too early with ENTER, I hate that somehow...)
Here is what Android says when it tries to select the HW codec:
W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc
W/OMXUtils: do not know color format 0x7fa30c04 = 2141391876
W/OMXUtils: do not know color format 0x7f000789 = 2130708361
I/ACodec: setupAVCEncoderParameters with [profile: Baseline] [level: Level32]
I/ACodec: [OMX.qcom.video.encoder.avc] cannot encode color aspects. Ignoring.
I/ACodec: [OMX.qcom.video.encoder.avc] cannot encode HDR static metadata. Ignoring.
I/ACodec: setupVideoEncoder succeeded
13 fps is most likely not hardwareeager-raincoat-52616
12/01/2023, 10:39 AMadventurous-twilight-28575
12/01/2023, 10:40 AMadventurous-twilight-28575
12/01/2023, 10:43 AMeager-raincoat-52616
12/01/2023, 10:44 AMadventurous-twilight-28575
12/01/2023, 11:17 AMdry-elephant-14928
12/01/2023, 5:34 PMadventurous-twilight-28575
12/01/2023, 5:47 PMadventurous-twilight-28575
12/01/2023, 6:33 PMadventurous-twilight-28575
12/01/2023, 7:19 PMdry-elephant-14928
12/01/2023, 7:33 PMadventurous-twilight-28575
12/01/2023, 7:36 PMadventurous-twilight-28575
12/04/2023, 10:57 AMI/OplusFeedbackInfo: 0xb40000766a9fca00 c2.mtk.avc.encoder 320x180 inputFps=30 outputFps=30 renderFps=0, discardFps=30
I/OplusFeedbackInfo: 0xb40000766a9fc800 c2.mtk.avc.encoder 640x360 inputFps=30 outputFps=31 renderFps=0, discardFps=30
I/OplusFeedbackInfo: 0xb4000076d4e6a200 c2.mtk.avc.encoder 1280x720 inputFps=29 outputFps=30 renderFps=0, discardFps=29adventurous-twilight-28575
12/06/2023, 2:14 PM