title: Unable to set remote SDP offer for H264 encoded video on Huawei devices
body: <p>I'm developing a WebRTC video call app (one-way video and two-way audio) for Android with prebuilt package
  <code>org.webrtc:google-webrtc:1.0.32006</code>. I'm stuck with an error from this lib that states:</p>
  <pre><code>LS_ERROR
  tag: webrtc_video_engine.cc 
  message: (line 745): No video codecs supported.
  </code></pre>
  <p>after trying to set a remote SDP offer:</p>
  <pre><code>v=0
  o=- 955391267744368972 0 IN IP4 0.0.0.0
  s=-
  t=0 0
  a=ice-options:trickle
  a=group:BUNDLE video0 audio1 application2
  m=video 9 UDP/TLS/RTP/SAVPF 96
  c=IN IP4 0.0.0.0
  a=setup:actpass
  a=ice-ufrag:NwMv07hmtKD9s8EFikQCvqv7JvMpVhv4
  a=ice-pwd:[xxx]
  a=rtcp-mux
  a=rtcp-rsize
  a=sendrecv
  a=rtpmap:96 H264/90000
  a=rtcp-fb:96 nack pli
  a=framerate:30
  a=fmtp:96 packetization-mode=1;profile-level-id=42c01f;sprop-parameter-sets=J0LAH5WgKA9oQAAAAwBAAAAPOSAACYlgABqz+97gHiRNQA==,KM4fIA==
  a=ssrc:2596331602 msid:user823769301@host-4c0ea8a4 webrtctransceiver0
  a=ssrc:2596331602 cname:user823769301@host-4c0ea8a4
  a=mid:video0
  a=fingerprint:sha-256 [xxx]
  m=audio 0 UDP/TLS/RTP/SAVPF 97
  c=IN IP4 0.0.0.0
  a=setup:actpass
  a=ice-ufrag:NwMv07hmtKD9s8EFikQCvqv7JvMpVhv4
  a=ice-pwd:[xxx]
  a=bundle-only
  a=rtcp-mux
  a=rtcp-rsize
  a=sendrecv
  a=rtpmap:97 OPUS/48000/2
  a=rtcp-fb:97 nack pli
  a=fmtp:97 sprop-maxcapturerate=48000;sprop-stereo=0
  a=ssrc:235675792 msid:user823769301@host-4c0ea8a4 webrtctransceiver1
  a=ssrc:235675792 cname:user823769301@host-4c0ea8a4
  a=mid:audio1
  a=fingerprint:sha-256 [xxx]
  m=application 0 UDP/DTLS/SCTP webrtc-datachannel
  c=IN IP4 0.0.0.0
  a=setup:actpass
  a=ice-ufrag:NwMv07hmtKD9s8EFikQCvqv7JvMpVhv4
  a=ice-pwd:[xxx]
  a=bundle-only
  a=mid:application2
  a=sctp-port:5000
  a=fingerprint:sha-256 [xxx]
  </code></pre>
  <p>It gets me confused as <code>android.media.MediaCodecList</code> contains <code>OMX.google.h264</code> and <code>HardwareVideoDecoderFactory::supportedCodecs</code> contains <code>name: H264; params: {level-asymmetry-allowed=1, profile-level-id=42e01f, packetization-mode=1}</code></p>
  <p>I'm using Honor 7X and Huawei P10 and I'm aware that their chipsets lack the hardware H264 encoding which is fine as I <strong>do not stream any video</strong> from the Android device.</p>
  <p>As a video streaming device I use RaspberryPi build with GStreamer as media processing pipeline. The output of <code>v4l2-ctl --list-formats</code>:</p>
  <pre><code>    Type: Video Capture
  
      [0]: 'YU12' (Planar YUV 4:2:0)
      [1]: 'YUYV' (YUYV 4:2:2)
      [2]: 'RGB3' (24-bit RGB 8-8-8)
      [3]: 'JPEG' (JFIF JPEG, compressed)
      [4]: 'H264' (H.264, compressed)
      [5]: 'MJPG' (Motion-JPEG, compressed)
      [6]: 'YVYU' (YVYU 4:2:2)
      [7]: 'VYUY' (VYUY 4:2:2)
      [8]: 'UYVY' (UYVY 4:2:2)
      [9]: 'NV12' (Y/CbCr 4:2:0)
      [10]: 'BGR3' (24-bit BGR 8-8-8)
      [11]: 'YV12' (Planar YVU 4:2:0)
      [12]: 'NV21' (Y/CrCb 4:2:0)
      [13]: 'RX24' (32-bit XBGR 8-8-8-8)
  </code></pre>
  <p>And this is my pipeline definition:</p>
  <pre><code>#define RTP_CAPS_OPUS &quot;application/x-rtp,media=audio,encoding-name=OPUS,payload=&quot;
  #define RTP_CAPS_H264 &quot;application/x-rtp,media=video,encoding-name=H264,payload=&quot;
  
  &quot;v4l2src ! video/x-raw,width=640,height=480,framerate=30/1 ! v4l2h264enc ! video/x-h264,level=(string)3.1,stream-format=(string)byte-stream ! h264parse ! rtph264pay ! &quot;  
          &quot;&quot; RTP_CAPS_H264 &quot;96 ! sendrecv. &quot;
          &quot;alsasrc ! queue ! webrtcdsp noise-suppression-level=3 ! webrtcechoprobe ! audioamplify amplification=1 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! &quot;
          &quot;queue ! &quot; RTP_CAPS_OPUS &quot;97 ! sendrecv. &quot;
  </code></pre>
  <p>My guess is that the H264 profiles are different (RPi: <code>42c01f</code>; Huawei: <code>42e01f</code>). Also difference in the format's payload might be in a way (<code>96</code> vs. <code>100</code> respectively), however I don't have any clue about the significance of these differences.</p>
  <p>My second guess is that I should not set <code>a=sendrecv</code> in both clients video media description, but I can't figure out how to accomplish that via WebRTC Android API. Should I put <code>sendonly</code> for RPi then?</p>
  <p>And finally, why should I set the <code>VideoEncoderFactory</code> event though I don't encode any video? Without explicitly passing a <code>DefaultVideoEncoderFactory</code> to <code>PeerConnection</code> I cannot establish any connection at all.</p>
  <p>Would you be able to point me in the right direction? Any clues, experiences and documentation pieces are highly appreciated!</p>