Open FabienDanieau opened 9 months ago
3.0.0-pre.6
* OS: Android - Oculus Quest 2 * Unity version: Unity 2020.3.48f1
Adapting the code from AudioSample.cs, I wanted to display the available codecs on the Oculus Quest 2
Basically I call this
static string CodecToOptionName(RTCRtpCodecCapability cap) { return string.Format($"{cap.mimeType} " + $"{cap.clockRate} " + $"channel={cap.channels}" + $"sdpFmtpLine={cap.sdpFmtpLine}"); }
in a webrtc call
protected override void WebRTCCall() { _receiveStream = new MediaStream(); _receiveStream.OnAddTrack += OnAddTrack; if (_pc != null) { _pc.OnTrack = (evt) => { Debug.Log($"[WebRTC] OnTrack {evt.Track} id: {evt.Track.Id}"); if (evt.Track.Kind == TrackKind.Video) { _receiveStream.AddTrack(evt.Track); var codecs = RTCRtpSender.GetCapabilities(TrackKind.Video).codecs; List<RTCRtpCodecCapability> availableCodecs = new List<RTCRtpCodecCapability>(); foreach (var codec in codecs) { Debug.LogError(CodecToOptionName(codec)); } ... }
The following codecs are found: 09-21 14:48:40.001 14697 14722 E Unity : video/VP8 90000 channel=sdpFmtpLine=implementation_name=Internal 09-21 14:48:40.001 14697 14722 E Unity : video/rtx 90000 channel=sdpFmtpLine= 09-21 14:48:40.002 14697 14722 E Unity : video/VP8 90000 channel=sdpFmtpLine=implementation_name=MediaCodec 09-21 14:48:40.003 14697 14722 E Unity : video/VP9 90000 channel=sdpFmtpLine=implementation_name=Internal;profile-id=0 09-21 14:48:40.003 14697 14722 E Unity : video/H264 90000 channel=sdpFmtpLine=implementation_name=MediaCodec;level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f 09-21 14:48:40.004 14697 14722 E Unity : video/AV1 90000 channel=sdpFmtpLine=implementation_name=Internal 09-21 14:48:40.005 14697 14722 E Unity : video/red 90000 channel=sdpFmtpLine= 09-21 14:48:40.005 14697 14722 E Unity : video/ulpfec 90000 channel=sdpFmtpLine=
I only see the h264 baseline profile, although the h264 main and h265 should be supported by Android and Oculus Quest
Am I missing something here?
Thanks
No response
Looks related to #838
Package version
3.0.0-pre.6
Environment
Steps To Reproduce
Adapting the code from AudioSample.cs, I wanted to display the available codecs on the Oculus Quest 2
Basically I call this
in a webrtc call
Current Behavior
The following codecs are found: 09-21 14:48:40.001 14697 14722 E Unity : video/VP8 90000 channel=sdpFmtpLine=implementation_name=Internal 09-21 14:48:40.001 14697 14722 E Unity : video/rtx 90000 channel=sdpFmtpLine= 09-21 14:48:40.002 14697 14722 E Unity : video/VP8 90000 channel=sdpFmtpLine=implementation_name=MediaCodec 09-21 14:48:40.003 14697 14722 E Unity : video/VP9 90000 channel=sdpFmtpLine=implementation_name=Internal;profile-id=0 09-21 14:48:40.003 14697 14722 E Unity : video/H264 90000 channel=sdpFmtpLine=implementation_name=MediaCodec;level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f 09-21 14:48:40.004 14697 14722 E Unity : video/AV1 90000 channel=sdpFmtpLine=implementation_name=Internal 09-21 14:48:40.005 14697 14722 E Unity : video/red 90000 channel=sdpFmtpLine= 09-21 14:48:40.005 14697 14722 E Unity : video/ulpfec 90000 channel=sdpFmtpLine=
Expected Behavior
I only see the h264 baseline profile, although the h264 main and h265 should be supported by Android and Oculus Quest
Am I missing something here?
Thanks
Anything else?
No response